RocMarshal commented on code in PR #20990:
URL: https://github.com/apache/flink/pull/20990#discussion_r1561910994
##########
flink-connectors/flink-hadoop-compatibility/src/test/java/org/apache/flink/test/hadoopcompatibility/mapred/HadoopIOFormatsITCase.java:
##########
@@ -35,40 +38,54 @@
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.SequenceFileInputFormat;
-import org.junit.Assume;
-import org.junit.Before;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.TestTemplate;
+import org.junit.jupiter.api.extension.ExtendWith;
import java.io.File;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collection;
import static
org.apache.flink.test.util.TestBaseUtils.compareResultsByLinesInMemory;
+import static org.assertj.core.api.Assumptions.assumeThat;
/** Integration tests for Hadoop IO formats. */
-@RunWith(Parameterized.class)
-public class HadoopIOFormatsITCase extends JavaProgramTestBase {
+@ExtendWith(ParameterizedTestExtension.class)
+public class HadoopIOFormatsITCase extends JavaProgramTestBaseJUnit5 {
private static final int NUM_PROGRAMS = 2;
- private final int curProgId;
+ @Parameter private int curProgId;
private String[] resultPath;
private String[] expectedResult;
private String sequenceFileInPath;
private String sequenceFileInPathNull;
- public HadoopIOFormatsITCase(int curProgId) {
- this.curProgId = curProgId;
+ @BeforeEach
+ void checkOperatingSystem() {
+ // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems
+ assumeThat(OperatingSystem.isWindows())
+ .as("This test can't run successfully on Windows.")
+ .isFalse();
}
- @Before
- public void checkOperatingSystem() {
- // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems
- Assume.assumeTrue(
- "This test can't run successfully on Windows.",
!OperatingSystem.isWindows());
+ @Override
+ @TestTemplate
+ public void testJobWithObjectReuse() {
+ super.testJobWithoutObjectReuse();
+ }
+
+ @Override
+ @TestTemplate
+ public void testJobWithoutObjectReuse() {
+ super.testJobWithoutObjectReuse();
+ }
+
+ @Override
+ @TestTemplate
+ public void testJobCollectionExecution() {
+ super.testJobCollectionExecution();
}
Review Comment:
because it needs the `@TestTemplate`
--
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]