nicoloboschi commented on code in PR #19433:
URL: https://github.com/apache/pulsar/pull/19433#discussion_r1098835990
##########
managed-ledger/src/test/java/org/apache/bookkeeper/test/BookKeeperClusterTestCase.java:
##########
@@ -226,6 +226,8 @@ public void tearDown() throws Exception {
if (tearDownException != null) {
throw tearDownException;
}
+ // cleanup for metrics.
+ metadataStore.close();
Review Comment:
this should be done before killing zookeeper, can you add it in
stopZKCluster before `zkUtil.killCluster();` ?
##########
pulsar-metadata/src/test/java/org/apache/pulsar/metadata/CounterTest.java:
##########
@@ -95,6 +95,8 @@ public void testCounterDoesNotAutoReset(String provider,
Supplier<String> urlSup
assertNotEquals(l1, l4);
assertNotEquals(l2, l4);
assertNotEquals(l3, l4);
+
+ store2.close();
Review Comment:
please use try/finally block to ensure the store is closed even if the test
won't pass
##########
pulsar-metadata/src/test/java/org/apache/pulsar/metadata/impl/MetadataStoreFactoryImplTest.java:
##########
@@ -55,11 +55,13 @@ public void resetMetadataStoreProperty() {
@Test
- public void testCreate() throws MetadataStoreException{
+ public void testCreate() throws Exception{
MetadataStore instance = MetadataStoreFactoryImpl.create(
Review Comment:
please use try/finally block to ensure the store is closed even if the test
won't pass
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]