From 2d97cc1873b71b237e827d843cd5bd6d40f86d9c Mon Sep 17 00:00:00 2001 From: Till Rohrmann Date: Mon, 8 Jan 2018 15:09:32 +0100 Subject: [PATCH] [FLINK-7903] [tests] Add flip6 build profile The flip6 build profile only runs the Flip-6 related test cases. Moreover, all Flip-6 related test cases are excluded when not running the flip6 build profile. This should reduce testing time when adding more and more Flip-6 test cases. Include flink-test-utils-junit in all submodules to make the Category marker interfaces Flip6 and OldAndFlip6 available This closes #4889. --- flink-clients/pom.xml | 2 -- .../program/rest/RestClusterClientTest.java | 3 +++ flink-connectors/pom.xml | 5 ++++ .../flink-statebackend-rocksdb/pom.xml | 7 ------ flink-contrib/pom.xml | 7 ++++++ flink-core/pom.xml | 2 -- flink-examples/pom.xml | 5 ++++ flink-filesystems/flink-hadoop-fs/pom.xml | 9 ------- flink-filesystems/flink-mapr-fs/pom.xml | 7 ------ flink-filesystems/flink-s3-fs-hadoop/pom.xml | 9 ------- flink-filesystems/flink-s3-fs-presto/pom.xml | 9 ------- flink-filesystems/pom.xml | 7 ++++++ flink-fs-tests/pom.xml | 5 ++++ flink-java/pom.xml | 2 -- flink-libraries/pom.xml | 5 ++++ flink-mesos/pom.xml | 5 ++++ flink-metrics/pom.xml | 4 +++ flink-optimizer/pom.xml | 2 -- flink-queryable-state/pom.xml | 5 ++++ flink-runtime-web/pom.xml | 2 -- flink-runtime/pom.xml | 2 -- .../runtime/dispatcher/DispatcherTest.java | 3 +++ .../heartbeat/HeartbeatManagerTest.java | 3 +++ .../jobmaster/JobManagerRunnerMockTest.java | 3 +++ .../runtime/jobmaster/JobMasterTest.java | 3 +++ .../minicluster/MiniClusterITCase.java | 3 +++ .../JobLeaderIdServiceTest.java | 3 +++ .../ResourceManagerHATest.java | 3 +++ .../ResourceManagerJobMasterTest.java | 3 +++ .../ResourceManagerTaskExecutorTest.java | 3 +++ .../slotmanager/SlotManagerTest.java | 3 +++ .../slotmanager/SlotProtocolTest.java | 3 +++ .../runtime/rest/RestEndpointITCase.java | 3 +++ .../job/BlobServerPortHandlerTest.java | 3 +++ .../handler/job/JobSubmitHandlerTest.java | 3 +++ .../rest/messages/MessageParametersTest.java | 3 +++ .../RestRequestMarshallingTestBase.java | 3 +++ .../RestResponseMarshallingTestBase.java | 3 +++ .../flink/runtime/rpc/AsyncCallsTest.java | 3 +++ .../runtime/rpc/FencedRpcEndpointTest.java | 3 +++ .../flink/runtime/rpc/RpcConnectionTest.java | 3 +++ .../flink/runtime/rpc/RpcEndpointTest.java | 3 +++ .../runtime/rpc/akka/AkkaRpcActorTest.java | 3 +++ .../runtime/rpc/akka/AkkaRpcServiceTest.java | 3 +++ .../rpc/akka/MainThreadValidationTest.java | 3 +++ .../rpc/akka/MessageSerializationTest.java | 3 +++ .../taskexecutor/TaskExecutorITCase.java | 3 +++ .../taskexecutor/TaskExecutorTest.java | 3 +++ .../TaskManagerServicesConfigurationTest.java | 7 +++++- .../taskexecutor/TaskManagerServicesTest.java | 5 +++- .../taskexecutor/slot/TimerServiceTest.java | 7 +++++- flink-scala/pom.xml | 2 -- flink-streaming-java/pom.xml | 2 -- flink-streaming-scala/pom.xml | 5 ++++ .../flink/testutils/category/Flip6.java | 25 +++++++++++++++++++ .../flink/testutils/category/OldAndFlip6.java | 25 +++++++++++++++++++ flink-tests/pom.xml | 5 ++++ flink-yarn-tests/pom.xml | 5 ++++ flink-yarn/pom.xml | 5 ++++ pom.xml | 22 ++++++++++++++++ 60 files changed, 240 insertions(+), 60 deletions(-) create mode 100644 flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/category/Flip6.java create mode 100644 flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/category/OldAndFlip6.java diff --git a/flink-clients/pom.xml b/flink-clients/pom.xml index a875064e4a7..d175b8d0318 100644 --- a/flink-clients/pom.xml +++ b/flink-clients/pom.xml @@ -73,8 +73,6 @@ under the License. org.apache.flink flink-test-utils-junit - ${project.version} - test diff --git a/flink-clients/src/test/java/org/apache/flink/client/program/rest/RestClusterClientTest.java b/flink-clients/src/test/java/org/apache/flink/client/program/rest/RestClusterClientTest.java index 1bc04eb5587..b36b135b477 100644 --- a/flink-clients/src/test/java/org/apache/flink/client/program/rest/RestClusterClientTest.java +++ b/flink-clients/src/test/java/org/apache/flink/client/program/rest/RestClusterClientTest.java @@ -58,12 +58,14 @@ import org.apache.flink.runtime.rest.messages.job.savepoints.SavepointTriggerHea import org.apache.flink.runtime.rest.messages.job.savepoints.SavepointTriggerResponseBody; import org.apache.flink.runtime.rpc.RpcUtils; import org.apache.flink.runtime.webmonitor.retriever.GatewayRetriever; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler; import org.junit.Assert; import org.junit.Test; +import org.junit.experimental.categories.Category; import javax.annotation.Nonnull; @@ -86,6 +88,7 @@ import static org.mockito.Mockito.when; *

These tests verify that the client uses the appropriate headers for each * request, properly constructs the request bodies/parameters and processes the responses correctly. */ +@Category(Flip6.class) public class RestClusterClientTest extends TestLogger { private static final String restAddress = "http://localhost:1234"; diff --git a/flink-connectors/pom.xml b/flink-connectors/pom.xml index 6f048ca1b38..1b77833a836 100644 --- a/flink-connectors/pom.xml +++ b/flink-connectors/pom.xml @@ -72,6 +72,11 @@ under the License. jsr305 provided + + + org.apache.flink + flink-test-utils-junit + diff --git a/flink-contrib/flink-statebackend-rocksdb/pom.xml b/flink-contrib/flink-statebackend-rocksdb/pom.xml index 2a8a833ce5b..f9a49105037 100644 --- a/flink-contrib/flink-statebackend-rocksdb/pom.xml +++ b/flink-contrib/flink-statebackend-rocksdb/pom.xml @@ -62,13 +62,6 @@ under the License. - - org.apache.flink - flink-test-utils-junit - ${project.version} - test - - org.apache.flink flink-core diff --git a/flink-contrib/pom.xml b/flink-contrib/pom.xml index cbabe0dd7f1..d80ddb21c0f 100644 --- a/flink-contrib/pom.xml +++ b/flink-contrib/pom.xml @@ -43,4 +43,11 @@ under the License. flink-connector-wikiedits flink-statebackend-rocksdb + + + + org.apache.flink + flink-test-utils-junit + + diff --git a/flink-core/pom.xml b/flink-core/pom.xml index 18c84e88231..04652279288 100644 --- a/flink-core/pom.xml +++ b/flink-core/pom.xml @@ -91,8 +91,6 @@ under the License. org.apache.flink flink-test-utils-junit - ${project.version} - test diff --git a/flink-examples/pom.xml b/flink-examples/pom.xml index f8ffe9d1272..81584b91544 100644 --- a/flink-examples/pom.xml +++ b/flink-examples/pom.xml @@ -69,6 +69,11 @@ under the License. compile + + org.apache.flink + flink-test-utils-junit + + diff --git a/flink-filesystems/flink-hadoop-fs/pom.xml b/flink-filesystems/flink-hadoop-fs/pom.xml index 0e7fae3f1b3..425aa2c4a86 100644 --- a/flink-filesystems/flink-hadoop-fs/pom.xml +++ b/flink-filesystems/flink-hadoop-fs/pom.xml @@ -49,15 +49,6 @@ under the License. true - - - - org.apache.flink - flink-test-utils-junit - ${project.version} - test - - org.apache.flink diff --git a/flink-filesystems/flink-mapr-fs/pom.xml b/flink-filesystems/flink-mapr-fs/pom.xml index bdf7db5df17..d59baafdf82 100644 --- a/flink-filesystems/flink-mapr-fs/pom.xml +++ b/flink-filesystems/flink-mapr-fs/pom.xml @@ -65,13 +65,6 @@ under the License. true - - - - org.apache.flink - flink-test-utils-junit - ${project.version} - diff --git a/flink-filesystems/flink-s3-fs-hadoop/pom.xml b/flink-filesystems/flink-s3-fs-hadoop/pom.xml index 76d43f87c51..ca5790940a1 100644 --- a/flink-filesystems/flink-s3-fs-hadoop/pom.xml +++ b/flink-filesystems/flink-s3-fs-hadoop/pom.xml @@ -175,15 +175,6 @@ under the License. provided - - - - org.apache.flink - flink-test-utils-junit - ${project.version} - test - - org.apache.flink diff --git a/flink-filesystems/flink-s3-fs-presto/pom.xml b/flink-filesystems/flink-s3-fs-presto/pom.xml index 4bfc2f169df..8ff756183a1 100644 --- a/flink-filesystems/flink-s3-fs-presto/pom.xml +++ b/flink-filesystems/flink-s3-fs-presto/pom.xml @@ -198,15 +198,6 @@ under the License. provided - - - - org.apache.flink - flink-test-utils-junit - ${project.version} - test - - org.apache.flink diff --git a/flink-filesystems/pom.xml b/flink-filesystems/pom.xml index ab1d91566b9..0bdf09b4a70 100644 --- a/flink-filesystems/pom.xml +++ b/flink-filesystems/pom.xml @@ -62,4 +62,11 @@ under the License. + + + org.apache.flink + flink-test-utils-junit + + + diff --git a/flink-fs-tests/pom.xml b/flink-fs-tests/pom.xml index bf66f2798eb..71a69a33dff 100644 --- a/flink-fs-tests/pom.xml +++ b/flink-fs-tests/pom.xml @@ -65,6 +65,11 @@ under the License. test + + org.apache.flink + flink-test-utils-junit + + org.apache.flink flink-test-utils_${scala.binary.version} diff --git a/flink-java/pom.xml b/flink-java/pom.xml index b81d385b2b2..e8dd33b2742 100644 --- a/flink-java/pom.xml +++ b/flink-java/pom.xml @@ -63,8 +63,6 @@ under the License. org.apache.flink flink-test-utils-junit - ${project.version} - test diff --git a/flink-libraries/pom.xml b/flink-libraries/pom.xml index 7faa2a54271..b29a30c2cfc 100644 --- a/flink-libraries/pom.xml +++ b/flink-libraries/pom.xml @@ -59,6 +59,11 @@ under the License. jsr305 provided + + + org.apache.flink + flink-test-utils-junit + diff --git a/flink-mesos/pom.xml b/flink-mesos/pom.xml index 49df96a8e7c..9b3874ae139 100644 --- a/flink-mesos/pom.xml +++ b/flink-mesos/pom.xml @@ -132,6 +132,11 @@ under the License. test-jar + + org.apache.flink + flink-test-utils-junit + + org.apache.flink flink-test-utils_${scala.binary.version} diff --git a/flink-metrics/pom.xml b/flink-metrics/pom.xml index 562c1826483..b98cc34a6e6 100644 --- a/flink-metrics/pom.xml +++ b/flink-metrics/pom.xml @@ -60,6 +60,10 @@ under the License. jsr305 provided + + org.apache.flink + flink-test-utils-junit + diff --git a/flink-optimizer/pom.xml b/flink-optimizer/pom.xml index ec0e832ae23..33ab35bf121 100644 --- a/flink-optimizer/pom.xml +++ b/flink-optimizer/pom.xml @@ -71,8 +71,6 @@ under the License. org.apache.flink flink-test-utils-junit - ${project.version} - test diff --git a/flink-queryable-state/pom.xml b/flink-queryable-state/pom.xml index 29fb58f8501..651b1dcd5d7 100644 --- a/flink-queryable-state/pom.xml +++ b/flink-queryable-state/pom.xml @@ -51,5 +51,10 @@ under the License. jsr305 provided + + + org.apache.flink + flink-test-utils-junit + diff --git a/flink-runtime-web/pom.xml b/flink-runtime-web/pom.xml index 259ccd79e5e..fc45ddb13a2 100644 --- a/flink-runtime-web/pom.xml +++ b/flink-runtime-web/pom.xml @@ -82,8 +82,6 @@ under the License. org.apache.flink flink-test-utils-junit - ${project.version} - test diff --git a/flink-runtime/pom.xml b/flink-runtime/pom.xml index 2dc198f7a59..ce29e9760b4 100644 --- a/flink-runtime/pom.xml +++ b/flink-runtime/pom.xml @@ -202,8 +202,6 @@ under the License. org.apache.flink flink-test-utils-junit - ${project.version} - test diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java index 1e356f6369e..b75ae0613b4 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java @@ -50,6 +50,7 @@ import org.apache.flink.runtime.rpc.TestingRpcService; import org.apache.flink.runtime.testtasks.NoOpInvokable; import org.apache.flink.runtime.testutils.InMemorySubmittedJobGraphStore; import org.apache.flink.runtime.util.TestingFatalErrorHandler; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.junit.After; @@ -58,6 +59,7 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Rule; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.junit.rules.TemporaryFolder; import org.junit.rules.TestName; import org.mockito.Mockito; @@ -81,6 +83,7 @@ import static org.mockito.Mockito.verify; /** * Test for the {@link Dispatcher} component. */ +@Category(Flip6.class) public class DispatcherTest extends TestLogger { private static RpcService rpcService; diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/heartbeat/HeartbeatManagerTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/heartbeat/HeartbeatManagerTest.java index bff7484b515..390a1312e54 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/heartbeat/HeartbeatManagerTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/heartbeat/HeartbeatManagerTest.java @@ -23,9 +23,11 @@ import org.apache.flink.runtime.concurrent.Executors; import org.apache.flink.runtime.concurrent.ScheduledExecutor; import org.apache.flink.runtime.concurrent.ScheduledExecutorServiceAdapter; import org.apache.flink.runtime.util.DirectExecutorService; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -54,6 +56,7 @@ import static org.mockito.Mockito.when; /** * Tests for the {@link HeartbeatManager}. */ +@Category(Flip6.class) public class HeartbeatManagerTest extends TestLogger { private static final Logger LOG = LoggerFactory.getLogger(HeartbeatManagerTest.class); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobManagerRunnerMockTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobManagerRunnerMockTest.java index f94b4beb6c1..a0959c0ef88 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobManagerRunnerMockTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobManagerRunnerMockTest.java @@ -37,11 +37,13 @@ import org.apache.flink.runtime.metrics.MetricRegistryImpl; import org.apache.flink.runtime.metrics.MetricRegistryConfiguration; import org.apache.flink.runtime.rpc.FatalErrorHandler; import org.apache.flink.runtime.rpc.RpcService; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.junit.After; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -60,6 +62,7 @@ import static org.mockito.Mockito.when; @RunWith(PowerMockRunner.class) @PrepareForTest(JobManagerRunner.class) +@Category(Flip6.class) public class JobManagerRunnerMockTest extends TestLogger { private JobManagerRunner runner; diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java index 02047f8eb4d..1f944194289 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java @@ -43,8 +43,10 @@ import org.apache.flink.runtime.rpc.TestingRpcService; import org.apache.flink.runtime.taskexecutor.TaskExecutorGateway; import org.apache.flink.runtime.taskmanager.TaskManagerLocation; import org.apache.flink.runtime.util.TestingFatalErrorHandler; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.powermock.core.classloader.annotations.PrepareForTest; @@ -61,6 +63,7 @@ import static org.mockito.Mockito.*; @RunWith(PowerMockRunner.class) @PrepareForTest(BlobLibraryCacheManager.class) +@Category(Flip6.class) public class JobMasterTest extends TestLogger { private final Time testingTimeout = Time.seconds(10L); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/minicluster/MiniClusterITCase.java b/flink-runtime/src/test/java/org/apache/flink/runtime/minicluster/MiniClusterITCase.java index 8ca132919b4..f822e0c3340 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/minicluster/MiniClusterITCase.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/minicluster/MiniClusterITCase.java @@ -25,15 +25,18 @@ import org.apache.flink.runtime.jobgraph.JobGraph; import org.apache.flink.runtime.jobgraph.JobVertex; import org.apache.flink.runtime.jobgraph.ScheduleMode; import org.apache.flink.runtime.testtasks.NoOpInvokable; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.io.IOException; /** * Integration test cases for the {@link MiniCluster}. */ +@Category(Flip6.class) public class MiniClusterITCase extends TestLogger { // ------------------------------------------------------------------------ diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdServiceTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdServiceTest.java index fb5ee8bad7e..bb99a0ce423 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdServiceTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/JobLeaderIdServiceTest.java @@ -24,8 +24,10 @@ import org.apache.flink.runtime.concurrent.ScheduledExecutor; import org.apache.flink.runtime.highavailability.TestingHighAvailabilityServices; import org.apache.flink.runtime.jobmaster.JobMasterId; import org.apache.flink.runtime.leaderelection.TestingLeaderRetrievalService; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.mockito.ArgumentCaptor; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -54,6 +56,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; +@Category(Flip6.class) public class JobLeaderIdServiceTest extends TestLogger { /** diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerHATest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerHATest.java index 306d4d45803..960b4024402 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerHATest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerHATest.java @@ -30,9 +30,11 @@ import org.apache.flink.runtime.rpc.RpcService; import org.apache.flink.runtime.rpc.TestingRpcService; import org.apache.flink.runtime.testingUtils.TestingUtils; import org.apache.flink.runtime.util.TestingFatalErrorHandler; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.junit.Assert; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -42,6 +44,7 @@ import static org.mockito.Mockito.mock; /** * resourceManager HA test, including grant leadership and revoke leadership */ +@Category(Flip6.class) public class ResourceManagerHATest extends TestLogger { @Test diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerJobMasterTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerJobMasterTest.java index 1b6324c92d9..6fa84bbfdeb 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerJobMasterTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerJobMasterTest.java @@ -41,11 +41,13 @@ import org.apache.flink.runtime.registration.RegistrationResponse; import org.apache.flink.runtime.rpc.exceptions.FencingTokenException; import org.apache.flink.runtime.testingUtils.TestingUtils; import org.apache.flink.runtime.util.TestingFatalErrorHandler; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.ExceptionUtils; import org.apache.flink.util.TestLogger; import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -56,6 +58,7 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Mockito.*; +@Category(Flip6.class) public class ResourceManagerJobMasterTest extends TestLogger { private TestingRpcService rpcService; diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerTaskExecutorTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerTaskExecutorTest.java index 66d3ad6be48..00fbca75399 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerTaskExecutorTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerTaskExecutorTest.java @@ -38,11 +38,13 @@ import org.apache.flink.runtime.taskexecutor.TaskExecutorGateway; import org.apache.flink.runtime.taskexecutor.TaskExecutorRegistrationSuccess; import org.apache.flink.runtime.testingUtils.TestingUtils; import org.apache.flink.runtime.util.TestingFatalErrorHandler; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.ExceptionUtils; import org.apache.flink.util.TestLogger; import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -57,6 +59,7 @@ import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +@Category(Flip6.class) public class ResourceManagerTaskExecutorTest extends TestLogger { private final Time timeout = Time.seconds(10L); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerTest.java index 375eb0b5340..67a8cb957e9 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerTest.java @@ -38,9 +38,11 @@ import org.apache.flink.runtime.taskexecutor.SlotStatus; import org.apache.flink.runtime.taskexecutor.TaskExecutorGateway; import org.apache.flink.runtime.taskexecutor.exceptions.SlotAllocationException; import org.apache.flink.runtime.testingUtils.TestingUtils; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.mockito.ArgumentCaptor; import java.util.Arrays; @@ -68,6 +70,7 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +@Category(Flip6.class) public class SlotManagerTest extends TestLogger { /** diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotProtocolTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotProtocolTest.java index 79e38dfd9de..d47ac33850a 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotProtocolTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotProtocolTest.java @@ -33,11 +33,13 @@ import org.apache.flink.runtime.taskexecutor.SlotReport; import org.apache.flink.runtime.taskexecutor.SlotStatus; import org.apache.flink.runtime.taskexecutor.TaskExecutorGateway; import org.apache.flink.runtime.testingUtils.TestingUtils; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.ExecutorUtils; import org.apache.flink.util.TestLogger; import org.junit.AfterClass; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.mockito.Mockito; import java.util.Collections; @@ -52,6 +54,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.timeout; import static org.mockito.Mockito.verify; +@Category(Flip6.class) public class SlotProtocolTest extends TestLogger { private static final long timeout = 10000L; diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestEndpointITCase.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestEndpointITCase.java index ee59da76a5c..9954ab7b0d4 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestEndpointITCase.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestEndpointITCase.java @@ -38,6 +38,7 @@ import org.apache.flink.runtime.rpc.RpcUtils; import org.apache.flink.runtime.testingUtils.TestingUtils; import org.apache.flink.runtime.webmonitor.RestfulGateway; import org.apache.flink.runtime.webmonitor.retriever.GatewayRetriever; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.ExceptionUtils; import org.apache.flink.util.Preconditions; import org.apache.flink.util.TestLogger; @@ -51,6 +52,7 @@ import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; +import org.junit.experimental.categories.Category; import javax.annotation.Nonnull; @@ -69,6 +71,7 @@ import static org.mockito.Mockito.when; /** * IT cases for {@link RestClient} and {@link RestServerEndpoint}. */ +@Category(Flip6.class) public class RestEndpointITCase extends TestLogger { private static final JobID PATH_JOB_ID = new JobID(); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/BlobServerPortHandlerTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/BlobServerPortHandlerTest.java index 15c2eb4040b..0c2c2eda3d7 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/BlobServerPortHandlerTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/BlobServerPortHandlerTest.java @@ -28,12 +28,14 @@ import org.apache.flink.runtime.rest.messages.EmptyMessageParameters; import org.apache.flink.runtime.rest.messages.EmptyRequestBody; import org.apache.flink.runtime.rpc.RpcUtils; import org.apache.flink.runtime.webmonitor.retriever.GatewayRetriever; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus; import org.junit.Assert; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.util.Collections; import java.util.concurrent.CompletableFuture; @@ -46,6 +48,7 @@ import static org.mockito.Mockito.when; /** * Tests for the {@link BlobServerPortHandler}. */ +@Category(Flip6.class) public class BlobServerPortHandlerTest extends TestLogger { private static final int PORT = 64; diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/JobSubmitHandlerTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/JobSubmitHandlerTest.java index 212af5f02be..2428d38e22c 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/JobSubmitHandlerTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/JobSubmitHandlerTest.java @@ -28,12 +28,14 @@ import org.apache.flink.runtime.rest.messages.EmptyMessageParameters; import org.apache.flink.runtime.rest.messages.job.JobSubmitRequestBody; import org.apache.flink.runtime.rpc.RpcUtils; import org.apache.flink.runtime.webmonitor.retriever.GatewayRetriever; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus; import org.junit.Assert; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.util.Collections; import java.util.concurrent.CompletableFuture; @@ -45,6 +47,7 @@ import static org.mockito.Mockito.when; /** * Tests for the {@link JobSubmitHandler}. */ +@Category(Flip6.class) public class JobSubmitHandlerTest extends TestLogger { @Test diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/MessageParametersTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/MessageParametersTest.java index 2da7455bca8..65a1baa7235 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/MessageParametersTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/MessageParametersTest.java @@ -19,10 +19,12 @@ package org.apache.flink.runtime.rest.messages; import org.apache.flink.api.common.JobID; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.junit.Assert; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.util.Collection; import java.util.Collections; @@ -30,6 +32,7 @@ import java.util.Collections; /** * Tests for {@link MessageParameters}. */ +@Category(Flip6.class) public class MessageParametersTest extends TestLogger { @Test public void testResolveUrl() { diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/RestRequestMarshallingTestBase.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/RestRequestMarshallingTestBase.java index eacf201508f..6ae5bfa20c9 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/RestRequestMarshallingTestBase.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/RestRequestMarshallingTestBase.java @@ -19,16 +19,19 @@ package org.apache.flink.runtime.rest.messages; import org.apache.flink.runtime.rest.util.RestMapperUtils; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Assert; import org.junit.Test; +import org.junit.experimental.categories.Category; /** * Test base for verifying that marshalling / unmarshalling REST {@link RequestBody}s work properly. */ +@Category(Flip6.class) public abstract class RestRequestMarshallingTestBase extends TestLogger { /** diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/RestResponseMarshallingTestBase.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/RestResponseMarshallingTestBase.java index 6e1b532b4ee..3d2fa1ec4b2 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/RestResponseMarshallingTestBase.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/RestResponseMarshallingTestBase.java @@ -19,16 +19,19 @@ package org.apache.flink.runtime.rest.messages; import org.apache.flink.runtime.rest.util.RestMapperUtils; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Assert; import org.junit.Test; +import org.junit.experimental.categories.Category; /** * Test base for verifying that marshalling / unmarshalling REST {@link ResponseBody}s work properly. */ +@Category(Flip6.class) public abstract class RestResponseMarshallingTestBase extends TestLogger { /** diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/AsyncCallsTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/AsyncCallsTest.java index 9fe9904159e..9b72cb497b9 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/AsyncCallsTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/AsyncCallsTest.java @@ -26,11 +26,13 @@ import org.apache.flink.runtime.akka.AkkaUtils; import org.apache.flink.runtime.messages.Acknowledge; import org.apache.flink.runtime.rpc.akka.AkkaRpcService; import org.apache.flink.runtime.rpc.exceptions.FencingTokenException; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.ExceptionUtils; import org.apache.flink.util.TestLogger; import org.junit.AfterClass; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -43,6 +45,7 @@ import java.util.function.Function; import static org.junit.Assert.*; +@Category(Flip6.class) public class AsyncCallsTest extends TestLogger { // ------------------------------------------------------------------------ diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/FencedRpcEndpointTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/FencedRpcEndpointTest.java index 47a37d57d06..b8040510f8c 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/FencedRpcEndpointTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/FencedRpcEndpointTest.java @@ -23,6 +23,7 @@ import org.apache.flink.core.testutils.OneShotLatch; import org.apache.flink.runtime.messages.Acknowledge; import org.apache.flink.runtime.rpc.exceptions.FencingTokenException; import org.apache.flink.runtime.rpc.exceptions.RpcException; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.ExceptionUtils; import org.apache.flink.util.FlinkException; import org.apache.flink.util.TestLogger; @@ -30,6 +31,7 @@ import org.apache.flink.util.TestLogger; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -44,6 +46,7 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +@Category(Flip6.class) public class FencedRpcEndpointTest extends TestLogger { private static final Time timeout = Time.seconds(10L); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/RpcConnectionTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/RpcConnectionTest.java index 4220fff935a..26630c824ce 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/RpcConnectionTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/RpcConnectionTest.java @@ -26,8 +26,10 @@ import org.apache.flink.runtime.akka.AkkaUtils; import org.apache.flink.runtime.rpc.akka.AkkaRpcService; import org.apache.flink.runtime.rpc.exceptions.RpcConnectionException; import org.apache.flink.runtime.taskexecutor.TaskExecutorGateway; +import org.apache.flink.testutils.category.Flip6; import org.junit.Test; +import org.junit.experimental.categories.Category; import scala.Option; import scala.Tuple2; @@ -43,6 +45,7 @@ import static org.junit.Assert.*; * This test validates that the RPC service gives a good message when it cannot * connect to an RpcEndpoint. */ +@Category(Flip6.class) public class RpcConnectionTest { @Test diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/RpcEndpointTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/RpcEndpointTest.java index b3e8ee62eea..6d60de922fe 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/RpcEndpointTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/RpcEndpointTest.java @@ -21,12 +21,14 @@ package org.apache.flink.runtime.rpc; import org.apache.flink.api.common.time.Time; import org.apache.flink.runtime.akka.AkkaUtils; import org.apache.flink.runtime.rpc.akka.AkkaRpcService; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import akka.actor.ActorSystem; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; @@ -39,6 +41,7 @@ import static org.junit.Assert.fail; /** * Tests for the RpcEndpoint and its self gateways. */ +@Category(Flip6.class) public class RpcEndpointTest extends TestLogger { private static final Time TIMEOUT = Time.seconds(10L); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActorTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActorTest.java index dd49ee163d8..3ff1b802145 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActorTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActorTest.java @@ -27,12 +27,14 @@ import org.apache.flink.runtime.rpc.RpcGateway; import org.apache.flink.runtime.rpc.RpcService; import org.apache.flink.runtime.rpc.akka.exceptions.AkkaRpcException; import org.apache.flink.runtime.rpc.exceptions.RpcConnectionException; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.FlinkException; import org.apache.flink.util.TestLogger; import org.hamcrest.core.Is; import org.junit.AfterClass; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -44,6 +46,7 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +@Category(Flip6.class) public class AkkaRpcActorTest extends TestLogger { // ------------------------------------------------------------------------ diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcServiceTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcServiceTest.java index d20a090d477..a5c41ef15ab 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcServiceTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcServiceTest.java @@ -23,11 +23,13 @@ import org.apache.flink.core.testutils.OneShotLatch; import org.apache.flink.runtime.akka.AkkaUtils; import org.apache.flink.runtime.concurrent.FutureUtils; import org.apache.flink.runtime.concurrent.ScheduledExecutor; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import akka.actor.ActorSystem; import org.junit.AfterClass; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.util.concurrent.Callable; import java.util.concurrent.CompletableFuture; @@ -42,6 +44,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +@Category(Flip6.class) public class AkkaRpcServiceTest extends TestLogger { // ------------------------------------------------------------------------ diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/MainThreadValidationTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/MainThreadValidationTest.java index 96a9ee43b9f..8f35c0f6afd 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/MainThreadValidationTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/MainThreadValidationTest.java @@ -25,11 +25,14 @@ import org.apache.flink.runtime.rpc.RpcEndpoint; import org.apache.flink.runtime.rpc.RpcGateway; import org.apache.flink.runtime.rpc.RpcService; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.junit.Test; +import org.junit.experimental.categories.Category; import static org.junit.Assert.assertTrue; +@Category(Flip6.class) public class MainThreadValidationTest extends TestLogger { @Test diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/MessageSerializationTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/MessageSerializationTest.java index c722980a66d..bb46bec23a7 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/MessageSerializationTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/MessageSerializationTest.java @@ -26,11 +26,13 @@ import org.apache.flink.runtime.akka.AkkaUtils; import org.apache.flink.runtime.rpc.RpcEndpoint; import org.apache.flink.runtime.rpc.RpcGateway; import org.apache.flink.runtime.rpc.RpcService; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.hamcrest.core.Is; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.io.IOException; import java.util.concurrent.CompletableFuture; @@ -42,6 +44,7 @@ import static org.junit.Assert.fail; /** * Tests that akka rpc invocation messages are properly serialized and errors reported */ +@Category(Flip6.class) public class MessageSerializationTest extends TestLogger { private static ActorSystem actorSystem1; private static ActorSystem actorSystem2; diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorITCase.java b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorITCase.java index 01f445b8cc4..72558ea3258 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorITCase.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorITCase.java @@ -57,10 +57,12 @@ import org.apache.flink.runtime.taskexecutor.slot.TimerService; import org.apache.flink.runtime.taskmanager.TaskManagerLocation; import org.apache.flink.runtime.testingUtils.TestingUtils; import org.apache.flink.runtime.util.TestingFatalErrorHandler; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.TestLogger; import org.hamcrest.Matchers; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.mockito.Mockito; import java.net.InetAddress; @@ -81,6 +83,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +@Category(Flip6.class) public class TaskExecutorITCase extends TestLogger { private final Time timeout = Time.seconds(10L); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorTest.java index 29d07fa7160..08d325654a5 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorTest.java @@ -81,6 +81,7 @@ import org.apache.flink.runtime.taskmanager.TaskExecutionState; import org.apache.flink.runtime.taskmanager.TaskManagerActions; import org.apache.flink.runtime.taskmanager.TaskManagerLocation; import org.apache.flink.runtime.util.TestingFatalErrorHandler; +import org.apache.flink.testutils.category.Flip6; import org.apache.flink.util.ExceptionUtils; import org.apache.flink.util.SerializedValue; import org.apache.flink.util.TestLogger; @@ -90,6 +91,7 @@ import org.junit.Before; import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.junit.rules.TestName; import org.mockito.ArgumentCaptor; import org.mockito.Matchers; @@ -126,6 +128,7 @@ import static org.mockito.Mockito.timeout; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +@Category(Flip6.class) public class TaskExecutorTest extends TestLogger { private final Time timeout = Time.milliseconds(10000L); diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesConfigurationTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesConfigurationTest.java index ddd6462bfeb..2699a05da98 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesConfigurationTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesConfigurationTest.java @@ -20,14 +20,19 @@ package org.apache.flink.runtime.taskexecutor; import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.TaskManagerOptions; +import org.apache.flink.testutils.category.OldAndFlip6; +import org.apache.flink.util.TestLogger; + import org.junit.Test; +import org.junit.experimental.categories.Category; import static org.junit.Assert.*; /** * Unit test for {@link TaskManagerServicesConfiguration}. */ -public class TaskManagerServicesConfigurationTest { +@Category(OldAndFlip6.class) +public class TaskManagerServicesConfigurationTest extends TestLogger { /** * Verifies that {@link TaskManagerServicesConfiguration#hasNewNetworkBufConf(Configuration)} * returns the correct result for old configurations via diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesTest.java index 0059866cd1c..b0c6c60a9b2 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerServicesTest.java @@ -20,9 +20,11 @@ package org.apache.flink.runtime.taskexecutor; import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.TaskManagerOptions; +import org.apache.flink.testutils.category.OldAndFlip6; import org.apache.flink.util.TestLogger; import org.junit.Test; +import org.junit.experimental.categories.Category; import java.util.Random; @@ -33,7 +35,8 @@ import static org.junit.Assert.fail; /** * Unit test for {@link TaskManagerServices}. */ -public class TaskManagerServicesTest extends TestLogger{ +@Category(OldAndFlip6.class) +public class TaskManagerServicesTest extends TestLogger { /** * Test for {@link TaskManagerServices#calculateNetworkBufferMemory(long, Configuration)} using old diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/slot/TimerServiceTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/slot/TimerServiceTest.java index cad36245d2d..ddaa0a6c537 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/slot/TimerServiceTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/slot/TimerServiceTest.java @@ -19,7 +19,11 @@ package org.apache.flink.runtime.taskexecutor.slot; import org.apache.flink.runtime.clusterframework.types.AllocationID; +import org.apache.flink.testutils.category.Flip6; +import org.apache.flink.util.TestLogger; + import org.junit.Test; +import org.junit.experimental.categories.Category; import org.mockito.internal.util.reflection.Whitebox; import java.util.Map; @@ -35,7 +39,8 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -public class TimerServiceTest { +@Category(Flip6.class) +public class TimerServiceTest extends TestLogger { /** * Test all timeouts registered can be unregistered * @throws Exception diff --git a/flink-scala/pom.xml b/flink-scala/pom.xml index 3e625cb48ba..05d0f6776f7 100644 --- a/flink-scala/pom.xml +++ b/flink-scala/pom.xml @@ -76,8 +76,6 @@ under the License. org.apache.flink flink-test-utils-junit - ${project.version} - test diff --git a/flink-streaming-java/pom.xml b/flink-streaming-java/pom.xml index f99b3795480..ef8f1622b4b 100644 --- a/flink-streaming-java/pom.xml +++ b/flink-streaming-java/pom.xml @@ -78,8 +78,6 @@ under the License. org.apache.flink flink-test-utils-junit - ${project.version} - test diff --git a/flink-streaming-scala/pom.xml b/flink-streaming-scala/pom.xml index be5c37865de..16a5a21d408 100644 --- a/flink-streaming-scala/pom.xml +++ b/flink-streaming-scala/pom.xml @@ -71,6 +71,11 @@ under the License. test + + org.apache.flink + flink-test-utils-junit + + org.apache.flink flink-test-utils_${scala.binary.version} diff --git a/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/category/Flip6.java b/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/category/Flip6.java new file mode 100644 index 00000000000..f23e5b58760 --- /dev/null +++ b/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/category/Flip6.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.testutils.category; + +/** + * Category marker interface for Flip-6 tests. + */ +public interface Flip6 { +} diff --git a/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/category/OldAndFlip6.java b/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/category/OldAndFlip6.java new file mode 100644 index 00000000000..fd24534aacd --- /dev/null +++ b/flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/category/OldAndFlip6.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.testutils.category; + +/** + * Category marker interface for old and Flip-6 tests. + */ +public interface OldAndFlip6 { +} diff --git a/flink-tests/pom.xml b/flink-tests/pom.xml index 60dcde56559..9d767a2e2a7 100644 --- a/flink-tests/pom.xml +++ b/flink-tests/pom.xml @@ -131,6 +131,11 @@ under the License. test + + org.apache.flink + flink-test-utils-junit + + org.apache.flink flink-test-utils_${scala.binary.version} diff --git a/flink-yarn-tests/pom.xml b/flink-yarn-tests/pom.xml index 9f9de5f13ae..6af7126c64b 100644 --- a/flink-yarn-tests/pom.xml +++ b/flink-yarn-tests/pom.xml @@ -41,6 +41,11 @@ under the License. + + org.apache.flink + flink-test-utils-junit + + org.apache.flink flink-shaded-jackson diff --git a/flink-yarn/pom.xml b/flink-yarn/pom.xml index 6fc589edb47..9aaae026d90 100644 --- a/flink-yarn/pom.xml +++ b/flink-yarn/pom.xml @@ -96,6 +96,11 @@ under the License. test + + org.apache.flink + flink-test-utils-junit + + org.apache.flink flink-runtime_${scala.binary.version} diff --git a/pom.xml b/pom.xml index 40c7fa5b14c..6b68932efe5 100644 --- a/pom.xml +++ b/pom.xml @@ -126,6 +126,9 @@ under the License. 1.6.5 1.3 false + + + org.apache.flink.testutils.category.Flip6 + + org.apache.flink + flink-test-utils-junit + ${project.version} + test + + + flip6 + + org.apache.flink.testutils.category.Flip6, org.apache.flink.testutils.category.OldAndFlip6 + + + + + spotbugs @@ -1104,6 +1124,8 @@ under the License. 2.18.1 + ${test.groups} + ${test.excludedGroups} ${flink.forkCount} ${flink.reuseForks} -- GitLab