[ https://issues.apache.org/jira/browse/HDFS-17719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17925490#comment-17925490 ]
ASF GitHub Bot commented on HDFS-17719: --------------------------------------- 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] ``` > Upgrade JUnit from 4 to 5 in hadoop-hdfs-httpfs. > ------------------------------------------------ > > Key: HDFS-17719 > URL: https://issues.apache.org/jira/browse/HDFS-17719 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Shilun Fan > Assignee: Shilun Fan > Priority: Major > Labels: pull-request-available > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org