You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/02 07:17:27 UTC
[GitHub] [pulsar] 315157973 commented on a change in pull request #9420: Fix flaky test ConsumedLedgersTrimTest.testConsumedLedgersTrimNoSubscriptions
315157973 commented on a change in pull request #9420:
URL: https://github.com/apache/pulsar/pull/9420#discussion_r568370573
##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ConsumedLedgersTrimTest.java
##########
@@ -142,6 +143,14 @@ public void testConsumedLedgersTrimNoSubscriptions() throws Exception {
// the lastMessageId is still on the previous ledger
restartBroker();
// force load topic
+ Awaitility.await().atMost(5, TimeUnit.SECONDS).until(() -> {
+ try {
+ pulsar.getBrokerService().getTopicIfExists(topicName).get(3, TimeUnit.SECONDS).get();
+ return true;
+ } catch (Exception ignored) {
+ }
Review comment:
The exception will not be automatically caught, you can try to throw a RuntimeException directly inside.
The test will be interrupted
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org