Skip to content

Commit

Permalink
Fix commit latch count
Browse files Browse the repository at this point in the history
  • Loading branch information
garyrussell committed Jun 3, 2019
1 parent ebe4c9b commit 9d8adf2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1885,7 +1885,7 @@ public void testPauseResume() throws Exception {
}
return first.getAndSet(false) ? consumerRecords : emptyRecords;
});
final CountDownLatch commitLatch = new CountDownLatch(2);
final CountDownLatch commitLatch = new CountDownLatch(3);
willAnswer(i -> {
commitLatch.countDown();
return null;
Expand Down Expand Up @@ -1934,7 +1934,7 @@ else if (e instanceof ConsumerStoppedEvent) {
});
container.start();
assertThat(commitLatch.await(10, TimeUnit.SECONDS)).isTrue();
verify(consumer, atLeast(3)).commitSync(anyMap());
verify(consumer, times(3)).commitSync(anyMap());
assertThat(container.isContainerPaused()).isFalse();
container.pause();
assertThat(container.isPaused()).isTrue();
Expand Down

0 comments on commit 9d8adf2

Please sign in to comment.