Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
acogoluegnes committed Dec 11, 2024
1 parent 3d6b1dc commit dfd94df
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ void consumeWithAsyncConsumerFlowControl() throws Exception {
void asynchronousProcessingWithFlowControl() {
int messageCount = 100_000;
publishAndWaitForConfirms(cf, messageCount, stream);

try (ExecutorService executorService =
Executors.newFixedThreadPool(getRuntime().availableProcessors())) {
ExecutorService executorService =
Executors.newFixedThreadPool(getRuntime().availableProcessors());
try {
CountDownLatch latch = new CountDownLatch(messageCount);
environment.consumerBuilder().stream(stream)
.offset(OffsetSpecification.first())
Expand All @@ -261,6 +261,8 @@ void asynchronousProcessingWithFlowControl() {
}))
.build();
assertThat(latch).is(completed());
} finally {
executorService.shutdownNow();
}
}

Expand Down

0 comments on commit dfd94df

Please sign in to comment.