Skip to content

Commit

Permalink
[FLINK-29846] Add ITCase suffix for hadoop tests extending AbstractTe…
Browse files Browse the repository at this point in the history
…stBase, allow empty for Minicluster extension rule
  • Loading branch information
snuyanzin committed Dec 11, 2022
1 parent 052cd8e commit ed0f15c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class ITCaseRules {
.doNotHaveModifier(ABSTRACT)
.should()
.haveSimpleNameEndingWith("ITCase"))
// FALSE by default however not every module has inheritors of AbstractTestBase
// FALSE by default since 0.23.0 however not every module has inheritors of AbstractTestBase
.allowEmptyShould(true)
.as(
"Tests inheriting from AbstractTestBase should have name ending with ITCase");
Expand Down Expand Up @@ -130,6 +130,8 @@ public class ITCaseRules {
miniClusterWithClientResourceClassRule())
.or(
miniClusterWithClientResourceRule()))))
// FALSE by default since 0.23.0 however not every module has *ITCase tests
.allowEmptyShould(true)
.as("ITCASE tests should use a MiniCluster resource or extension");

private static DescribedPredicate<JavaClass> miniClusterWithClientResourceClassRule() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
simple name of org.apache.flink.formats.hadoop.bulk.HadoopPathBasedPartFileWriterTest does not end with 'ITCase' in (HadoopPathBasedPartFileWriterTest.java:0)
simple name of org.apache.flink.formats.hadoop.bulk.committer.HadoopRenameCommitterHDFSTest does not end with 'ITCase' in (HadoopRenameCommitterHDFSTest.java:0)
simple name of org.apache.flink.formats.hadoop.bulk.committer.HadoopRenameCommitterLocalFSTest does not end with 'ITCase' in (HadoopRenameCommitterLocalFSTest.java:0)
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import static org.assertj.core.api.Assertions.assertThat;

/** Base class for testing writing data to the hadoop file system with different configurations. */
public class HadoopPathBasedPartFileWriterTest extends AbstractTestBase {
public class HadoopPathBasedPartFileWriterITCase extends AbstractTestBase {
@Rule public final Timeout timeoutPerTest = Timeout.seconds(2000);

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import java.io.IOException;

/** Tests the behaviors of {@link HadoopRenameFileCommitter} with HDFS file system. */
public class HadoopRenameCommitterHDFSTest extends AbstractFileCommitterTest {
public class HadoopRenameCommitterHDFSITCase extends AbstractFileCommitterTest {

@ClassRule public static final TemporaryFolder CLASS_TEMPORARY_FOLDER = new TemporaryFolder();

Expand All @@ -56,7 +56,7 @@ public static void destroyHDFS() {
hdfsCluster = null;
}

public HadoopRenameCommitterHDFSTest(boolean override) throws IOException {
public HadoopRenameCommitterHDFSITCase(boolean override) throws IOException {
super(override);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
import java.io.IOException;

/** Tests the behaviors of {@link HadoopRenameFileCommitter} with local file system. */
public class HadoopRenameCommitterLocalFSTest extends AbstractFileCommitterTest {
public class HadoopRenameCommitterLocalFSITCase extends AbstractFileCommitterTest {

public HadoopRenameCommitterLocalFSTest(boolean override) throws IOException {
public HadoopRenameCommitterLocalFSITCase(boolean override) throws IOException {
super(override);
}

Expand Down

0 comments on commit ed0f15c

Please sign in to comment.