Improve some ZK tests

This commit is contained in:
Artem Bilan
2022-09-15 12:35:19 -04:00
parent a4997c67a0
commit 878f8cd3d9
2 changed files with 4 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2020 the original author or authors.
* Copyright 2015-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -81,13 +81,4 @@ public class ZookeeperTestSupport {
return client;
}
protected void closeClient(CuratorFramework client) {
try {
CloseableUtils.closeQuietly(client);
}
catch (Exception e) {
log.warn("Exception thrown while closing client: ", e);
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2020 the original author or authors.
* Copyright 2015-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -56,7 +56,7 @@ public class ZookeeperMetadataStoreTests extends ZookeeperTestSupport {
@BeforeEach
public void setUp() {
super.setUp();
this.metadataStore = new ZookeeperMetadataStore(client);
this.metadataStore = new ZookeeperMetadataStore(this.client);
this.metadataStore.start();
}
@@ -65,6 +65,7 @@ public class ZookeeperMetadataStoreTests extends ZookeeperTestSupport {
public void tearDown() throws Exception {
this.metadataStore.stop();
this.client.delete().deletingChildrenIfNeeded().forPath(this.metadataStore.getRoot());
super.tearDown();
}
@Test