Skip to content

Commit

Permalink
[FLINK-25159][tests] Streamline E2E surefire setup
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Dec 12, 2021
1 parent 41b2535 commit 47e6e89
Show file tree
Hide file tree
Showing 20 changed files with 36 additions and 318 deletions.
2 changes: 1 addition & 1 deletion flink-end-to-end-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Have a look at `test_batch_wordcount.sh` for a very basic test and
to put new functionality in `common.sh` so that it can be reused by other tests.

### Adding a test case
In order to add a new test case you need add it to either `test-scripts/run-nightly-tests.sh` and / or `test-scripts/run-pre-commit-tests.sh`. Templates on how to add tests can be found in those respective files.
In order to add a new test case you need add it to `test-scripts/run-nightly-tests.sh`. Templates on how to add tests can be found in those respective files.

_Note: If you want to parameterize your tests please do so by adding multiple test cases with parameters as arguments to the nightly / pre-commit test suites. This allows the test runner to do a cleanup in between each individual test and also to fail those tests individually._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,27 +90,8 @@ under the License.
</dependency>
</dependencies>

<!-- ONLY run the tests when explicitly told to do so -->
<properties>
<skipTests>true</skipTests>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>${skipTests}</skipTests>
<forkCount>1</forkCount> <!-- Enforce single test execution -->
</configuration>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Disabling convergence check because there are multiple problems within the used pubsub dependencies -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.apache.flink.configuration.Configuration;
import org.apache.flink.tests.util.TestUtils;
import org.apache.flink.tests.util.cache.DownloadCache;
import org.apache.flink.tests.util.categories.TravisGroup1;
import org.apache.flink.tests.util.flink.ClusterController;
import org.apache.flink.tests.util.flink.FlinkResource;
import org.apache.flink.tests.util.flink.FlinkResourceSetup;
Expand Down Expand Up @@ -65,7 +64,7 @@

/** End-to-end test for the kafka SQL connectors. */
@RunWith(Parameterized.class)
@Category(value = {TravisGroup1.class, FailsOnJava11.class})
@Category(value = {FailsOnJava11.class})
@Ignore("FLINK-21796")
public class SQLClientKafkaITCase extends TestLogger {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import org.apache.flink.api.common.time.Deadline;
import org.apache.flink.tests.util.TestUtils;
import org.apache.flink.tests.util.categories.TravisGroup1;
import org.apache.flink.tests.util.flink.SQLJobSubmission;
import org.apache.flink.tests.util.flink.container.FlinkContainers;
import org.apache.flink.tests.util.kafka.containers.SchemaRegistryContainer;
Expand All @@ -40,7 +39,6 @@
import org.junit.ClassRule;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.Timeout;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -61,7 +59,6 @@
import static org.junit.Assert.assertThat;

/** End-to-end test for SQL client using Avro Confluent Registry format. */
@Category(value = {TravisGroup1.class})
@Ignore("FLINK-25209")
public class SQLClientSchemaRegistryITCase {
private static final Logger LOG = LoggerFactory.getLogger(SQLClientSchemaRegistryITCase.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import org.apache.flink.configuration.Configuration;
import org.apache.flink.configuration.TaskManagerOptions;
import org.apache.flink.tests.util.TestUtils;
import org.apache.flink.tests.util.categories.PreCommit;
import org.apache.flink.tests.util.categories.TravisGroup1;
import org.apache.flink.tests.util.flink.ClusterController;
import org.apache.flink.tests.util.flink.FlinkResource;
import org.apache.flink.tests.util.flink.FlinkResourceSetup;
Expand Down Expand Up @@ -52,7 +50,7 @@

/** End-to-end test for the kafka connectors. */
@RunWith(Parameterized.class)
@Category(value = {TravisGroup1.class, PreCommit.class, FailsOnJava11.class})
@Category(value = {FailsOnJava11.class})
@Ignore("FLINK-25266")
public class StreamingKafkaITCase extends TestLogger {

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import org.apache.flink.api.common.time.Deadline;
import org.apache.flink.tests.util.TestUtils;
import org.apache.flink.tests.util.cache.DownloadCache;
import org.apache.flink.tests.util.categories.PreCommit;
import org.apache.flink.tests.util.categories.TravisGroup1;
import org.apache.flink.tests.util.flink.ClusterController;
import org.apache.flink.tests.util.flink.FlinkResource;
import org.apache.flink.tests.util.flink.FlinkResourceSetup;
Expand Down Expand Up @@ -68,7 +66,7 @@

/** End-to-end test for the HBase connectors. */
@RunWith(Parameterized.class)
@Category(value = {TravisGroup1.class, PreCommit.class, FailsOnJava11.class})
@Category(value = {FailsOnJava11.class})
@Ignore("FLINK-21519")
public class SQLClientHBaseITCase extends TestLogger {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.apache.flink.tests.scala;

import org.apache.flink.tests.util.TestUtils;
import org.apache.flink.tests.util.categories.TravisGroup1;
import org.apache.flink.tests.util.flink.ClusterController;
import org.apache.flink.tests.util.flink.FlinkResource;
import org.apache.flink.tests.util.flink.FlinkResourceSetup;
Expand All @@ -29,7 +28,6 @@

import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

Expand All @@ -44,7 +42,6 @@
* Tests that Flink does not require Scala for jobs that do not use the Scala APIs. This covers both
* pure Java jobs, and Scala jobs that use the Java APIs exclusively with Scala types.
*/
@Category(value = {TravisGroup1.class})
@RunWith(Parameterized.class)
public class ScalaFreeITCase extends TestLogger {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.apache.flink.streaming.connectors.kinesis.FlinkKinesisProducer;
import org.apache.flink.streaming.connectors.kinesis.config.ConsumerConfigConstants;
import org.apache.flink.streaming.connectors.kinesis.testutils.KinesaliteContainer;
import org.apache.flink.tests.util.categories.TravisGroup1;
import org.apache.flink.util.StringUtils;
import org.apache.flink.util.TestLogger;

Expand All @@ -40,7 +39,6 @@
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.Timeout;
import org.testcontainers.containers.Network;
import org.testcontainers.utility.DockerImageName;
Expand All @@ -58,7 +56,6 @@
import static org.apache.flink.streaming.connectors.kinesis.config.ConsumerConfigConstants.STREAM_INITIAL_POSITION;

/** End-to-end test for Glue Schema Registry AVRO format using Kinesalite. */
@Category(value = {TravisGroup1.class})
public class GlueSchemaRegistryAvroKinesisITCase extends TestLogger {
private static final String INPUT_STREAM = "gsr_avro_input_stream";
private static final String OUTPUT_STREAM = "gsr_avro_output_stream";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.apache.flink.streaming.connectors.kinesis.FlinkKinesisProducer;
import org.apache.flink.streaming.connectors.kinesis.config.ConsumerConfigConstants;
import org.apache.flink.streaming.connectors.kinesis.testutils.KinesaliteContainer;
import org.apache.flink.tests.util.categories.TravisGroup1;
import org.apache.flink.util.StringUtils;
import org.apache.flink.util.TestLogger;

Expand All @@ -37,7 +36,6 @@
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.Timeout;
import org.testcontainers.containers.Network;
import org.testcontainers.utility.DockerImageName;
Expand All @@ -54,7 +52,6 @@
import static org.apache.flink.streaming.connectors.kinesis.config.ConsumerConfigConstants.STREAM_INITIAL_POSITION;

/** End-to-end test for Glue Schema Registry Json format using Kinesalite. */
@Category(value = {TravisGroup1.class})
public class GlueSchemaRegistryJsonKinesisITCase extends TestLogger {
private static final String INPUT_STREAM = "gsr_json_input_stream";
private static final String OUTPUT_STREAM = "gsr_json_output_stream";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.apache.flink.runtime.rest.messages.taskmanager.TaskManagerInfo;
import org.apache.flink.runtime.rest.messages.taskmanager.TaskManagersHeaders;
import org.apache.flink.runtime.rest.messages.taskmanager.TaskManagersInfo;
import org.apache.flink.tests.util.categories.TravisGroup1;
import org.apache.flink.tests.util.flink.ClusterController;
import org.apache.flink.tests.util.flink.FlinkResource;
import org.apache.flink.tests.util.flink.FlinkResourceSetup;
Expand All @@ -47,7 +46,6 @@
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import javax.annotation.Nullable;

Expand All @@ -65,7 +63,6 @@
import java.util.stream.Collectors;

/** End-to-end test for the availability of metrics. */
@Category(TravisGroup1.class)
public class MetricsAvailabilityITCase extends TestLogger {

private static final String HOST = "localhost";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.flink.tests.util.AutoClosableProcess;
import org.apache.flink.tests.util.CommandLineWrapper;
import org.apache.flink.tests.util.cache.DownloadCache;
import org.apache.flink.tests.util.categories.TravisGroup1;
import org.apache.flink.tests.util.flink.ClusterController;
import org.apache.flink.tests.util.flink.FlinkResource;
import org.apache.flink.tests.util.flink.FlinkResourceSetup;
Expand All @@ -45,7 +44,6 @@
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.runner.RunWith;
import org.junit.runners.Parameterized;
Expand All @@ -67,7 +65,6 @@
import static org.apache.flink.tests.util.AutoClosableProcess.runNonBlocking;

/** End-to-end test for the PrometheusReporter. */
@Category(TravisGroup1.class)
@RunWith(Parameterized.class)
public class PrometheusReporterEndToEndITCase extends TestLogger {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.apache.flink.streaming.connectors.kinesis.testutils.KinesisPubsubClient;
import org.apache.flink.streaming.kinesis.test.model.Order;
import org.apache.flink.tests.util.TestUtils;
import org.apache.flink.tests.util.categories.TravisGroup1;
import org.apache.flink.tests.util.flink.SQLJobSubmission;
import org.apache.flink.tests.util.flink.container.FlinkContainers;
import org.apache.flink.util.DockerImageVersions;
Expand All @@ -39,7 +38,6 @@
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.Timeout;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -58,7 +56,6 @@
import static org.hamcrest.MatcherAssert.assertThat;

/** End-to-end test for Kinesis Table API using Kinesalite. */
@Category(value = {TravisGroup1.class})
public class KinesisTableApiITCase extends TestLogger {

private static final Logger LOGGER = LoggerFactory.getLogger(KinesisTableApiITCase.class);
Expand Down
Loading

0 comments on commit 47e6e89

Please sign in to comment.