You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2026/10/21 07:03:50 UTC

(pulsar) branch master updated: [fix][test] Stub the cancellable listener in PulsarLedgerCreateRecoveryTest (#27025)

This is an automated email from the ASF dual-hosted git repository.

codelipenghui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 5c982ff9d0c2 [fix][test] Stub the cancellable listener in PulsarLedgerCreateRecoveryTest (#27025)
5c982ff9d0c2 is described below

commit 5c982ff9d0c2a2a7529677da4347d1768d852e6a
Author: SeungTaek Lim <na...@gmail.com>
AuthorDate: Wed Oct 21 16:03:43 2026 +0900

    [fix][test] Stub the cancellable listener in PulsarLedgerCreateRecoveryTest (#27025)
---
 .../pulsar/metadata/bookkeeper/PulsarLedgerCreateRecoveryTest.java      | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pulsar-metadata/src/test/java/org/apache/pulsar/metadata/bookkeeper/PulsarLedgerCreateRecoveryTest.java b/pulsar-metadata/src/test/java/org/apache/pulsar/metadata/bookkeeper/PulsarLedgerCreateRecoveryTest.java
index ff7e78cc72fc..25f02525e8a7 100644
--- a/pulsar-metadata/src/test/java/org/apache/pulsar/metadata/bookkeeper/PulsarLedgerCreateRecoveryTest.java
+++ b/pulsar-metadata/src/test/java/org/apache/pulsar/metadata/bookkeeper/PulsarLedgerCreateRecoveryTest.java
@@ -319,6 +319,8 @@ public class PulsarLedgerCreateRecoveryTest {
                         MetadataCacheConfig.<LedgerMetadata>builder().refreshAfterWriteMillis(0)
                                 .expireAfterWriteMillis(0).build(), executor, scheduler);
             }).when(store).getMetadataCache(any(MetadataSerde.class));
+            // The manager cancels its store listener on close.
+            doReturn((Runnable) () -> { }).when(store).registerCancellableListener(any());
             manager = new PulsarLedgerManager(store, "/ledgers");
             path = manager.getLedgerPath(LEDGER_ID);
             doReturn(CompletableFuture.completedFuture(null)).when(store).sync(path);