Skip to content

Commit

Permalink
Fix flaky test CompactionReaderImplTest(wait until the consumerFutur…
Browse files Browse the repository at this point in the history
…e completes) (#19238)
  • Loading branch information
heesung-sn authored Jan 16, 2023
1 parent 246c270 commit f23363c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ public void test() throws Exception {
producer.newMessage().key("key:" + i).value("value" + i).send();
}

var consumerFuture = new CompletableFuture();
@Cleanup
CompactionReaderImpl<String> reader = CompactionReaderImpl
.create((PulsarClientImpl) pulsarClient, Schema.STRING, topic, new CompletableFuture(), null);
.create((PulsarClientImpl) pulsarClient, Schema.STRING, topic, consumerFuture, null);
consumerFuture.join();

ConsumerBase consumerBase = spy(reader.getConsumer());
FieldUtils.writeDeclaredField(
Expand Down

0 comments on commit f23363c

Please # to comment.