Skip to content

Commit 2e602c4

Browse files
shanthooshnramesh
authored andcommitted
SAMZA-1182 : Disable flaky tests in TestAsyncRunLoop
Author: Shanthoosh Venkataraman <svenkataraman@linkedin.com> Reviewers: Navina Ramesh <navina@apache.org> Closes apache#126 from shanthoosh/disable_all_async_run_loop_tests
1 parent e95088d commit 2e602c4

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

samza-core/src/test/java/org/apache/samza/task/TestAsyncRunLoop.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
import static org.mockito.Mockito.when;
6060
import static org.mockito.Mockito.atLeastOnce;
6161

62+
// TODO(spvenkat) SAMZA-1183: Fix all commented out tests.
6263
public class TestAsyncRunLoop {
6364
// Immutable objects shared by all test methods.
6465
private final ExecutorService executor = null;
@@ -201,7 +202,7 @@ public void setup() {
201202
when(consumerMultiplexer.pollIntervalMs()).thenReturn(10);
202203
}
203204

204-
@Test
205+
//@Test
205206
public void testProcessMultipleTasks() throws Exception {
206207
CountDownLatch task0ProcessedMessages = new CountDownLatch(1);
207208
CountDownLatch task1ProcessedMessages = new CountDownLatch(1);
@@ -232,7 +233,7 @@ public void testProcessMultipleTasks() throws Exception {
232233
assertEquals(2L, containerMetrics.processes().getCount());
233234
}
234235

235-
@Test
236+
//@Test
236237
public void testProcessInOrder() throws Exception {
237238
CountDownLatch task0ProcessedMessages = new CountDownLatch(2);
238239
CountDownLatch task1ProcessedMessages = new CountDownLatch(1);
@@ -286,7 +287,7 @@ public void run(TaskCallback callback) {
286287
};
287288
}
288289

289-
@Test
290+
//@Test
290291
public void testProcessOutOfOrder() throws Exception {
291292
int maxMessagesInFlight = 2;
292293

@@ -320,7 +321,7 @@ public void testProcessOutOfOrder() throws Exception {
320321
assertEquals(3L, containerMetrics.processes().getCount());
321322
}
322323

323-
@Test
324+
//@Test
324325
public void testWindow() throws Exception {
325326
TestTask task0 = new TestTask(true, true, false, null);
326327
TestTask task1 = new TestTask(true, false, true, null);
@@ -341,7 +342,7 @@ public void testWindow() throws Exception {
341342
assertEquals(4, task1.windowCount);
342343
}
343344

344-
@Test
345+
//@Test
345346
public void testCommitSingleTask() throws Exception {
346347
CountDownLatch task0ProcessedMessagesLatch = new CountDownLatch(1);
347348
CountDownLatch task1ProcessedMessagesLatch = new CountDownLatch(1);
@@ -371,7 +372,7 @@ public void testCommitSingleTask() throws Exception {
371372
verify(offsetManager, never()).checkpoint(taskName1);
372373
}
373374

374-
@Test
375+
//@Test
375376
public void testCommitAllTasks() throws Exception {
376377
CountDownLatch task0ProcessedMessagesLatch = new CountDownLatch(1);
377378
CountDownLatch task1ProcessedMessagesLatch = new CountDownLatch(1);
@@ -401,7 +402,7 @@ public void testCommitAllTasks() throws Exception {
401402
verify(offsetManager).checkpoint(taskName1);
402403
}
403404

404-
@Test
405+
//@Test
405406
public void testShutdownOnConsensus() throws Exception {
406407
CountDownLatch task0ProcessedMessagesLatch = new CountDownLatch(1);
407408
CountDownLatch task1ProcessedMessagesLatch = new CountDownLatch(1);
@@ -438,7 +439,7 @@ public void testShutdownOnConsensus() throws Exception {
438439
assertEquals(2L, containerMetrics.processes().getCount());
439440
}
440441

441-
@Test
442+
//@Test
442443
public void testEndOfStreamWithMultipleTasks() throws Exception {
443444
CountDownLatch task0ProcessedMessagesLatch = new CountDownLatch(1);
444445
CountDownLatch task1ProcessedMessagesLatch = new CountDownLatch(1);
@@ -476,7 +477,7 @@ public void testEndOfStreamWithMultipleTasks() throws Exception {
476477
assertEquals(2L, containerMetrics.processes().getCount());
477478
}
478479

479-
@Test
480+
//@Test
480481
public void testEndOfStreamWithOutOfOrderProcess() throws Exception {
481482
int maxMessagesInFlight = 2;
482483

@@ -518,7 +519,7 @@ public void testEndOfStreamWithOutOfOrderProcess() throws Exception {
518519
assertEquals(3L, containerMetrics.processes().getCount());
519520
}
520521

521-
@Test
522+
//@Test
522523
public void testEndOfStreamCommitBehavior() throws Exception {
523524
CountDownLatch task0ProcessedMessagesLatch = new CountDownLatch(1);
524525
CountDownLatch task1ProcessedMessagesLatch = new CountDownLatch(1);
@@ -556,7 +557,7 @@ public void testEndOfStreamCommitBehavior() throws Exception {
556557
}
557558

558559
// TODO: Add assertions.
559-
@Test
560+
//@Test
560561
public void testEndOfStreamOffsetManagement() throws Exception {
561562
//explicitly configure to disable commits inside process or window calls and invoke commit from end of stream
562563
TestTask mockStreamTask1 = new TestTask(true, false, false, null);
@@ -614,7 +615,7 @@ public void testEndOfStreamOffsetManagement() throws Exception {
614615
runLoop.run();
615616
}
616617

617-
@Test
618+
//@Test
618619
public void testCommitBehaviourWhenAsyncCommitIsEnabled() throws InterruptedException {
619620
int maxMessagesInFlight = 3;
620621
TestTask task0 = new TestTask(true, true, false, null,
@@ -671,7 +672,7 @@ public void testCommitBehaviourWhenAsyncCommitIsEnabled() throws InterruptedExce
671672
assertEquals(0, task1.committed);
672673
}
673674

674-
@Test
675+
//@Test
675676
public void testProcessBehaviourWhenAsyncCommitIsEnabled() throws InterruptedException {
676677
int maxMessagesInFlight = 2;
677678
TestTask task0 = new TestTask(true, true, false, null, maxMessagesInFlight);

0 commit comments

Comments
 (0)