Skip to content

Commit

Permalink
[FLINK-7903] [tests] Add flip6 build profile
Browse files Browse the repository at this point in the history
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 apache#4889.
  • Loading branch information
tillrohrmann committed Jan 9, 2018
1 parent f16335d commit 2d97cc1
Show file tree
Hide file tree
Showing 60 changed files with 240 additions and 60 deletions.
2 changes: 0 additions & 2 deletions flink-clients/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ under the License.
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@
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;

Expand All @@ -86,6 +88,7 @@
* <p>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 = "https://localhost:1234";
Expand Down
5 changes: 5 additions & 0 deletions flink-connectors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ under the License.
<artifactId>jsr305</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
</dependency>
</dependencies>

<!-- See main pom.xml for explanation of profiles -->
Expand Down
7 changes: 0 additions & 7 deletions flink-contrib/flink-statebackend-rocksdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ under the License.

<!-- test dependencies -->

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
Expand Down
7 changes: 7 additions & 0 deletions flink-contrib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,11 @@ under the License.
<module>flink-connector-wikiedits</module>
<module>flink-statebackend-rocksdb</module>
</modules>

<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
</dependency>
</dependencies>
</project>
2 changes: 0 additions & 2 deletions flink-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ under the License.
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<dependency>
Expand Down
5 changes: 5 additions & 0 deletions flink-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ under the License.
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
</dependency>

</dependencies>

<build>
Expand Down
9 changes: 0 additions & 9 deletions flink-filesystems/flink-hadoop-fs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ under the License.
<optional>true</optional>
</dependency>

<!-- test dependencies -->

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<!-- for the behavior test suite -->
<dependency>
<groupId>org.apache.flink</groupId>
Expand Down
7 changes: 0 additions & 7 deletions flink-filesystems/flink-mapr-fs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,6 @@ under the License.
<optional>true</optional>
</dependency>

<!-- test dependencies -->

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
9 changes: 0 additions & 9 deletions flink-filesystems/flink-s3-fs-hadoop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,6 @@ under the License.
<scope>provided</scope>
</dependency>

<!-- test dependencies -->

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<!-- for the behavior test suite -->
<dependency>
<groupId>org.apache.flink</groupId>
Expand Down
9 changes: 0 additions & 9 deletions flink-filesystems/flink-s3-fs-presto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,6 @@ under the License.
<scope>provided</scope>
</dependency>

<!-- test dependencies -->

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<!-- for the behavior test suite -->
<dependency>
<groupId>org.apache.flink</groupId>
Expand Down
7 changes: 7 additions & 0 deletions flink-filesystems/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,11 @@ under the License.
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
</dependency>
</dependencies>

</project>
5 changes: 5 additions & 0 deletions flink-fs-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ under the License.
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils_${scala.binary.version}</artifactId>
Expand Down
2 changes: 0 additions & 2 deletions flink-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ under the License.
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

</dependencies>
Expand Down
5 changes: 5 additions & 0 deletions flink-libraries/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ under the License.
<artifactId>jsr305</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
5 changes: 5 additions & 0 deletions flink-mesos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ under the License.
<type>test-jar</type>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils_${scala.binary.version}</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions flink-metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ under the License.
<artifactId>jsr305</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
</dependency>
</dependencies>

</project>
2 changes: 0 additions & 2 deletions flink-optimizer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ under the License.
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down
5 changes: 5 additions & 0 deletions flink-queryable-state/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,10 @@ under the License.
<artifactId>jsr305</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
</dependency>
</dependencies>
</project>
2 changes: 0 additions & 2 deletions flink-runtime-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ under the License.
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<dependency>
Expand Down
2 changes: 0 additions & 2 deletions flink-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ under the License.
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
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;
Expand All @@ -58,6 +59,7 @@
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;
Expand All @@ -81,6 +83,7 @@
/**
* Test for the {@link Dispatcher} component.
*/
@Category(Flip6.class)
public class DispatcherTest extends TestLogger {

private static RpcService rpcService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
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;

Expand Down Expand Up @@ -54,6 +56,7 @@
/**
* Tests for the {@link HeartbeatManager}.
*/
@Category(Flip6.class)
public class HeartbeatManagerTest extends TestLogger {
private static final Logger LOG = LoggerFactory.getLogger(HeartbeatManagerTest.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
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;
Expand All @@ -60,6 +62,7 @@

@RunWith(PowerMockRunner.class)
@PrepareForTest(JobManagerRunner.class)
@Category(Flip6.class)
public class JobManagerRunnerMockTest extends TestLogger {

private JobManagerRunner runner;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@
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;
Expand All @@ -61,6 +63,7 @@

@RunWith(PowerMockRunner.class)
@PrepareForTest(BlobLibraryCacheManager.class)
@Category(Flip6.class)
public class JobMasterTest extends TestLogger {

private final Time testingTimeout = Time.seconds(10L);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,18 @@
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 {

// ------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
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;
Expand Down Expand Up @@ -54,6 +56,7 @@
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

@Category(Flip6.class)
public class JobLeaderIdServiceTest extends TestLogger {

/**
Expand Down
Loading

0 comments on commit 2d97cc1

Please sign in to comment.