You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/07/25 05:38:10 UTC

[GitHub] [bookkeeper] liuzhuang2017 commented on a diff in pull request #3361: Fix autoRecover memory leak.

liuzhuang2017 commented on code in PR #3361:
URL: https://github.com/apache/bookkeeper/pull/3361#discussion_r928485652


##########
bookkeeper-server/src/test/java/org/apache/bookkeeper/meta/AbstractZkLedgerManagerTest.java:
##########
@@ -824,9 +824,16 @@ public void testUnregisterLedgerMetadataListener() throws Exception {
             ledgerStr, true,
             KeeperException.Code.OK.intValue(), serDe.serialize(metadata), stat);
 
+        mockZkRemoveWatcher();
+
         // unregister the listener
         ledgerManager.unregisterLedgerMetadataListener(ledgerId, listener);
         assertFalse(ledgerManager.listeners.containsKey(ledgerId));
+        assertFalse(watchers.containsKey(ledgerStr));
+        verify(mockZk, times(1)).removeWatches(any(String.class),

Review Comment:
   good idea, 👍



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org