Skip to content

Commit ff9f1b9

Browse files
authored
[fix][test] Fix flaky PersistentTopicTerminateTest.testRecoverAfterTerminate (#25345)
1 parent 7f6bc23 commit ff9f1b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pulsar-broker/src/test/java/org/apache/pulsar/client/api/PersistentTopicTerminateTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public void testRecoverAfterTerminate() throws Exception {
6464
assertEquals(msg2.getValue(), "2");
6565

6666
// Verify: the ledgers acked will be cleaned up.
67-
admin.topics().skipAllMessages(topicName, subscriptionName);
68-
Awaitility.await().untilAsserted(() -> {
67+
consumer.acknowledgeCumulative(msg2);
68+
Awaitility.await().atMost(30, TimeUnit.SECONDS).untilAsserted(() -> {
6969
PersistentTopic persistentTopic =
7070
(PersistentTopic) getTopic(topicName, false).join().get();
7171
ManagedLedgerImpl ml = (ManagedLedgerImpl) persistentTopic.getManagedLedger();

0 commit comments

Comments
 (0)