Skip to content

Commit 9d8adf2

Browse files
committed
Fix commit latch count
1 parent ebe4c9b commit 9d8adf2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-kafka/src/test/java/org/springframework/kafka/listener/KafkaMessageListenerContainerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,7 +1885,7 @@ public void testPauseResume() throws Exception {
18851885
}
18861886
return first.getAndSet(false) ? consumerRecords : emptyRecords;
18871887
});
1888-
final CountDownLatch commitLatch = new CountDownLatch(2);
1888+
final CountDownLatch commitLatch = new CountDownLatch(3);
18891889
willAnswer(i -> {
18901890
commitLatch.countDown();
18911891
return null;
@@ -1934,7 +1934,7 @@ else if (e instanceof ConsumerStoppedEvent) {
19341934
});
19351935
container.start();
19361936
assertThat(commitLatch.await(10, TimeUnit.SECONDS)).isTrue();
1937-
verify(consumer, atLeast(3)).commitSync(anyMap());
1937+
verify(consumer, times(3)).commitSync(anyMap());
19381938
assertThat(container.isContainerPaused()).isFalse();
19391939
container.pause();
19401940
assertThat(container.isPaused()).isTrue();

0 commit comments

Comments
 (0)