From d856162e2729faafb78eaeb03424df74efa473ed Mon Sep 17 00:00:00 2001 From: Zixuan Liu Date: Tue, 14 May 2024 10:20:37 +0800 Subject: [PATCH] Fix test Signed-off-by: Zixuan Liu --- .../org/apache/pulsar/broker/service/PersistentTopicTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicTest.java index eda962e2701899..ca9568ed73c680 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicTest.java @@ -1801,6 +1801,7 @@ public void testAtomicReplicationRemoval() throws Exception { .getCluster(remoteCluster)))); replicatorMap.put(remoteReplicatorName, replicator); + String cursorName = PersistentReplicator.getReplicatorName(topic.getReplicatorPrefix(), remoteReplicatorName); // step-1 remove replicator : it will disconnect the producer but it will wait for callback to be completed Method removeMethod = PersistentTopic.class.getDeclaredMethod("removeReplicator", String.class); removeMethod.setAccessible(true); @@ -1815,7 +1816,7 @@ public void testAtomicReplicationRemoval() throws Exception { // step-3 : complete the callback to remove replicator from the list ArgumentCaptor captor = ArgumentCaptor.forClass(DeleteCursorCallback.class); - Mockito.verify(ledgerMock).asyncDeleteCursor(any(), captor.capture(), any()); + Mockito.verify(ledgerMock).asyncDeleteCursor(eq(cursorName), captor.capture(), any()); DeleteCursorCallback callback = captor.getValue(); callback.deleteCursorComplete(null); }