[
https://issues.apache.org/jira/browse/HADOOP-19415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17950815#comment-17950815
]
ASF GitHub Bot commented on HADOOP-19415:
-----------------------------------------
slfan1989 commented on code in PR #7419:
URL: https://github.com/apache/hadoop/pull/7419#discussion_r2083689694
##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/rawlocal/TestRawlocalContractPathHandle.java:
##########
@@ -18,17 +18,13 @@
package org.apache.hadoop.fs.contract.rawlocal;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.Options;
import org.apache.hadoop.fs.contract.AbstractContractPathHandleTest;
import org.apache.hadoop.fs.contract.AbstractFSContract;
-import org.apache.hadoop.fs.contract.rawlocal.RawlocalFSContract;
public class TestRawlocalContractPathHandle
extends AbstractContractPathHandleTest {
- public TestRawlocalContractPathHandle(String testname,
- Options.HandleOpt[] opts, boolean serialized) {
- super(testname, opts, serialized);
+ public TestRawlocalContractPathHandle() {
Review Comment:
This is a good question! The reason for the modification is due to
differences between JUnit 4 and JUnit 5 in handling ParameterizedTest. In JUnit
4, we could inject parameters into the constructor to implement
ParameterizedTest, but in JUnit 5, parameters must be injected into each test
method. To adapt to JUnit 5's ParameterizedTest, we adjusted the constructor of
the parent class AbstractContractPathHandleTest in
TestRawlocalContractPathHandle.java and made necessary changes for the
ParameterizedTest. Since the parent class constructor no longer exists, we also
need to synchronize the constructor changes in the subclass.
> Upgrade JUnit from 4 to 5 in hadoop-common.
> -------------------------------------------
>
> Key: HADOOP-19415
> URL: https://issues.apache.org/jira/browse/HADOOP-19415
> Project: Hadoop Common
> Issue Type: Sub-task
> 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: [email protected]
For additional commands, e-mail: [email protected]