Skip to content

Commit

Permalink
[FLINK-27169][tests] Set timeout for operator lifecycle tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rkhachatryan committed May 26, 2022
1 parent f0ec84a commit 9bf10eb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.rules.Timeout;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;

import java.io.IOException;
import java.time.Duration;
import java.util.concurrent.TimeUnit;

import static org.apache.flink.runtime.operators.lifecycle.command.TestCommand.FINISH_SOURCES;
import static org.apache.flink.runtime.operators.lifecycle.command.TestCommandDispatcher.TestCommandScope.ALL_SUBTASKS;
Expand Down Expand Up @@ -70,6 +72,8 @@ public class BoundedSourceITCase extends TestLogger {

@Rule public final SharedObjects sharedObjects = SharedObjects.create();

@Rule public Timeout timeoutRule = new Timeout(10, TimeUnit.MINUTES);

private static Configuration configuration() {
Configuration conf = new Configuration();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.rules.Timeout;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
Expand All @@ -45,6 +46,7 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.TimeUnit;

import static java.util.Arrays.asList;
import static java.util.stream.StreamSupport.stream;
Expand Down Expand Up @@ -74,6 +76,8 @@ public class PartiallyFinishedSourcesITCase extends TestLogger {

@Rule public final SharedObjects sharedObjects = SharedObjects.create();

@Rule public Timeout timeoutRule = new Timeout(10, TimeUnit.MINUTES);

private MiniClusterWithClientResource miniClusterResource;

@Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.rules.Timeout;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;

import java.util.List;
import java.util.concurrent.TimeUnit;

import static org.apache.flink.runtime.operators.lifecycle.graph.TestJobBuilders.COMPLEX_GRAPH_BUILDER;
import static org.apache.flink.runtime.operators.lifecycle.graph.TestJobBuilders.SIMPLE_GRAPH_BUILDER;
Expand Down Expand Up @@ -98,6 +100,7 @@ public class StopWithSavepointITCase extends AbstractTestBase {

@Rule public final TemporaryFolder temporaryFolder = new TemporaryFolder();
@Rule public final SharedObjects sharedObjects = SharedObjects.create();
@Rule public Timeout timeoutRule = new Timeout(10, TimeUnit.MINUTES);

@Parameter(0)
public boolean withDrain;
Expand Down

0 comments on commit 9bf10eb

Please sign in to comment.