slfan1989 commented on PR #7371:
URL: https://github.com/apache/hadoop/pull/7371#issuecomment-2647142071

   @cnauroth @ayushtkn This is the first unit test upgrade pr for HDFS. Can you 
help review this PR? Thank you very much!
   
   This PR may provide additional information as follows:
   
   The following JUnit 4 classes have been removed in JUnit 5:  
   - `org.junit.rules.MethodRule`  
   - `org.junit.runners.model.FrameworkMethod`  
   - `org.junit.runners.model.Statement`  
   
   We will use JUnit 5's `BeforeEachCallback`, `AfterEachCallback`, and 
`TestExecutionExceptionHandler` as replacements for the relevant functionality. 
So far, it appears to be working as expected.
   
   This PR may have some Checkstyle issues in the end, but I don’t plan to fix 
them for now, as doing so could introduce additional code changes. I plan to 
address these issues after all JUnit 4 to JUnit 5 upgrades are completed.
   
   The list of Checkstyle issues is as follows:
   
   ```
   
./hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/HTestCase.java:40:
  public TestDirHelper testDir = new TestDirHelper();:24: Variable 'testDir' 
must be private and have accessor methods. [VisibilityModifier]
   
./hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/HTestCase.java:43:
  public TestJettyHelper jettyTestHelper = new TestJettyHelper();:26: Variable 
'jettyTestHelper' must be private and have accessor methods. 
[VisibilityModifier]
   
./hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/HTestCase.java:46:
  public TestExceptionHelper exceptionHelper = new TestExceptionHelper();:30: 
Variable 'exceptionHelper' must be private and have accessor methods. 
[VisibilityModifier]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to