Skip to content

Commit

Permalink
[branch-2.10] Fix flaky test (#21135)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattisonchao authored Sep 6, 2023
1 parent fd86ada commit 1300eb5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public void cleanup() throws Exception {
public void testFetchPartitionedTopicMetadataWithCacheRefresh() throws Exception {
final String configMetadataStoreConnectString =
WhiteboxImpl.getInternalState(pulsar.getConfigurationMetadataStore(), "zkConnectString");
final ZooKeeper anotherZKCli = new ZooKeeper(configMetadataStoreConnectString, 5000, null);
final ZooKeeper anotherZKCli = new ZooKeeper(configMetadataStoreConnectString, 5000,
watchedEvent -> { });
// Set policy of auto create topic to PARTITIONED.
final String ns = defaultTenant + "/ns_" + UUID.randomUUID().toString().replaceAll("-", "");
final TopicName topicName1 = TopicName.get("persistent://" + ns + "/tp1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Message<byte[]>> messages = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1300eb5

Please sign in to comment.