diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BatchMessageTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BatchMessageTest.java index a2d80b2ba600b6..c66eff2c8a180c 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BatchMessageTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BatchMessageTest.java @@ -768,6 +768,7 @@ public void testConcurrentBatchMessageAck(BatcherBuilder builder) throws Excepti final Consumer myConsumer = pulsarClient.newConsumer().topic(topicName) .subscriptionName(subscriptionName).subscriptionType(SubscriptionType.Shared).subscribe(); // assertEquals(dispatcher.getTotalUnackedMessages(), 1); + @Cleanup("shutdownNow") ExecutorService executor = Executors.newFixedThreadPool(10); final CountDownLatch latch = new CountDownLatch(numMsgs);