From 8efc1e836b1e27f18174fe6c79d860886766b250 Mon Sep 17 00:00:00 2001 From: Qiang Zhao Date: Tue, 5 Sep 2023 22:51:26 +0800 Subject: [PATCH] Fix flaky test --- .../test/java/org/apache/pulsar/compaction/CompactionTest.java | 2 +- .../main/java/org/apache/pulsar/client/impl/ConsumerImpl.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactionTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactionTest.java index 0eec3e31cca1d..5e9a11fbfb071 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactionTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactionTest.java @@ -570,7 +570,7 @@ public void testBatchMessageWithNullValue() throws Exception { // compact the topic Compactor compactor = new TwoPhaseCompactor(conf, pulsarClient, bk, compactionScheduler); - compactor.compact(topic); + compactor.compact(topic).join(); // Read messages before compaction to get ids List> messages = new ArrayList<>(); diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java index e86651523167d..fd9d2d41af192 100644 --- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java +++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java @@ -35,7 +35,6 @@ import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Arrays; -import java.util.BitSet; import java.util.Collections; import java.util.HashMap; import java.util.List;