Skip to content

Commit

Permalink
SAMZA-1182 : Disable flaky tests in TestAsyncRunLoop
Browse files Browse the repository at this point in the history
Author: Shanthoosh Venkataraman <[email protected]>

Reviewers: Navina Ramesh <[email protected]>

Closes apache#126 from shanthoosh/disable_all_async_run_loop_tests
  • Loading branch information
shanthoosh authored and nramesh committed Apr 18, 2017
1 parent e95088d commit 2e602c4
Showing 1 changed file with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.atLeastOnce;

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

@Test
//@Test
public void testProcessMultipleTasks() throws Exception {
CountDownLatch task0ProcessedMessages = new CountDownLatch(1);
CountDownLatch task1ProcessedMessages = new CountDownLatch(1);
Expand Down Expand Up @@ -232,7 +233,7 @@ public void testProcessMultipleTasks() throws Exception {
assertEquals(2L, containerMetrics.processes().getCount());
}

@Test
//@Test
public void testProcessInOrder() throws Exception {
CountDownLatch task0ProcessedMessages = new CountDownLatch(2);
CountDownLatch task1ProcessedMessages = new CountDownLatch(1);
Expand Down Expand Up @@ -286,7 +287,7 @@ public void run(TaskCallback callback) {
};
}

@Test
//@Test
public void testProcessOutOfOrder() throws Exception {
int maxMessagesInFlight = 2;

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

@Test
//@Test
public void testWindow() throws Exception {
TestTask task0 = new TestTask(true, true, false, null);
TestTask task1 = new TestTask(true, false, true, null);
Expand All @@ -341,7 +342,7 @@ public void testWindow() throws Exception {
assertEquals(4, task1.windowCount);
}

@Test
//@Test
public void testCommitSingleTask() throws Exception {
CountDownLatch task0ProcessedMessagesLatch = new CountDownLatch(1);
CountDownLatch task1ProcessedMessagesLatch = new CountDownLatch(1);
Expand Down Expand Up @@ -371,7 +372,7 @@ public void testCommitSingleTask() throws Exception {
verify(offsetManager, never()).checkpoint(taskName1);
}

@Test
//@Test
public void testCommitAllTasks() throws Exception {
CountDownLatch task0ProcessedMessagesLatch = new CountDownLatch(1);
CountDownLatch task1ProcessedMessagesLatch = new CountDownLatch(1);
Expand Down Expand Up @@ -401,7 +402,7 @@ public void testCommitAllTasks() throws Exception {
verify(offsetManager).checkpoint(taskName1);
}

@Test
//@Test
public void testShutdownOnConsensus() throws Exception {
CountDownLatch task0ProcessedMessagesLatch = new CountDownLatch(1);
CountDownLatch task1ProcessedMessagesLatch = new CountDownLatch(1);
Expand Down Expand Up @@ -438,7 +439,7 @@ public void testShutdownOnConsensus() throws Exception {
assertEquals(2L, containerMetrics.processes().getCount());
}

@Test
//@Test
public void testEndOfStreamWithMultipleTasks() throws Exception {
CountDownLatch task0ProcessedMessagesLatch = new CountDownLatch(1);
CountDownLatch task1ProcessedMessagesLatch = new CountDownLatch(1);
Expand Down Expand Up @@ -476,7 +477,7 @@ public void testEndOfStreamWithMultipleTasks() throws Exception {
assertEquals(2L, containerMetrics.processes().getCount());
}

@Test
//@Test
public void testEndOfStreamWithOutOfOrderProcess() throws Exception {
int maxMessagesInFlight = 2;

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

@Test
//@Test
public void testEndOfStreamCommitBehavior() throws Exception {
CountDownLatch task0ProcessedMessagesLatch = new CountDownLatch(1);
CountDownLatch task1ProcessedMessagesLatch = new CountDownLatch(1);
Expand Down Expand Up @@ -556,7 +557,7 @@ public void testEndOfStreamCommitBehavior() throws Exception {
}

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

@Test
//@Test
public void testCommitBehaviourWhenAsyncCommitIsEnabled() throws InterruptedException {
int maxMessagesInFlight = 3;
TestTask task0 = new TestTask(true, true, false, null,
Expand Down Expand Up @@ -671,7 +672,7 @@ public void testCommitBehaviourWhenAsyncCommitIsEnabled() throws InterruptedExce
assertEquals(0, task1.committed);
}

@Test
//@Test
public void testProcessBehaviourWhenAsyncCommitIsEnabled() throws InterruptedException {
int maxMessagesInFlight = 2;
TestTask task0 = new TestTask(true, true, false, null, maxMessagesInFlight);
Expand Down

0 comments on commit 2e602c4

Please sign in to comment.