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 2022/09/27 09:08:09 UTC
[GitHub] [pulsar] nicoloboschi commented on a diff in pull request #17851: [fix][tests] Fix Mockito mocks memory leak
nicoloboschi commented on code in PR #17851:
URL: https://github.com/apache/pulsar/pull/17851#discussion_r980978416
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockedPulsarServiceBaseTest.java:
##########
@@ -304,11 +307,19 @@ protected void stopBroker() throws Exception {
// set shutdown timeout to 0 for forceful shutdown
pulsar.getConfiguration().setBrokerShutdownTimeoutMs(0L);
pulsar.close();
+ cleanupMock(pulsar);
pulsar = null;
// Simulate cleanup of ephemeral nodes
//mockZooKeeper.delete("/loadbalance/brokers/localhost:" + pulsar.getConfiguration().getWebServicePort(), -1);
}
+ protected void cleanupMock(Object mock) {
Review Comment:
what about adding this method to `BrokerTestUtil` ?
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org