4141import org .junit .jupiter .api .AfterEach ;
4242import org .junit .jupiter .api .BeforeEach ;
4343import org .junit .jupiter .api .Test ;
44+ import org .junit .jupiter .api .Timeout ;
4445import org .junit .jupiter .params .ParameterizedTest ;
4546import org .junit .jupiter .params .provider .EnumSource ;
4647
6061import java .util .Queue ;
6162import java .util .concurrent .CompletableFuture ;
6263import java .util .concurrent .ConcurrentLinkedDeque ;
64+ import java .util .concurrent .TimeUnit ;
6365import java .util .function .Supplier ;
6466
6567import static org .apache .flink .runtime .jobgraph .tasks .CheckpointCoordinatorConfiguration .MINIMAL_CHECKPOINT_TIME ;
@@ -131,6 +133,7 @@ void clearData() {
131133
132134 @ ParameterizedTest
133135 @ EnumSource (DeliveryGuarantee .class )
136+ @ Timeout (value = 30000 , unit = TimeUnit .MILLISECONDS )
134137 void testForNormalCaseWithoutFailure (
135138 DeliveryGuarantee guarantee , @ InjectClusterClient ClusterClient <?> client )
136139 throws Exception {
@@ -149,6 +152,7 @@ void testForNormalCaseWithoutFailure(
149152 }
150153
151154 @ Test
155+ @ Timeout (value = 30000 , unit = TimeUnit .MILLISECONDS )
152156 void testExactlyOnceWithFailure (@ InjectClusterClient ClusterClient <?> client ) throws Exception {
153157 // Test continuous + unbounded splits
154158 StreamExecutionEnvironment env = getEnvWithRestartStrategyParallelism ();
@@ -167,6 +171,7 @@ void testExactlyOnceWithFailure(@InjectClusterClient ClusterClient<?> client) th
167171 }
168172
169173 @ Test
174+ @ Timeout (value = 30000 , unit = TimeUnit .MILLISECONDS )
170175 void testAtLeastOnceWithFailure (@ InjectClusterClient ClusterClient <?> client ) throws Exception {
171176 // Test continuous + unbounded splits
172177 StreamExecutionEnvironment env = getEnvWithRestartStrategyParallelism ();
@@ -186,6 +191,7 @@ void testAtLeastOnceWithFailure(@InjectClusterClient ClusterClient<?> client) th
186191 }
187192
188193 @ Test
194+ @ Timeout (value = 30000 , unit = TimeUnit .MILLISECONDS )
189195 void testAtMostOnceWithFailure (@ InjectClusterClient ClusterClient <?> client ) throws Exception {
190196 // Test continuous + unbounded splits
191197 StreamExecutionEnvironment env = getEnvWithRestartStrategyParallelism ();
0 commit comments