Skip to content

Commit 878f8cd

Browse files
committed
Improve some ZK tests
1 parent a4997c6 commit 878f8cd

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

spring-integration-zookeeper/src/test/java/org/springframework/integration/zookeeper/ZookeeperTestSupport.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2020 the original author or authors.
2+
* Copyright 2015-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -81,13 +81,4 @@ protected static CuratorFramework createNewClient() {
8181
return client;
8282
}
8383

84-
protected void closeClient(CuratorFramework client) {
85-
try {
86-
CloseableUtils.closeQuietly(client);
87-
}
88-
catch (Exception e) {
89-
log.warn("Exception thrown while closing client: ", e);
90-
}
91-
}
92-
9384
}

spring-integration-zookeeper/src/test/java/org/springframework/integration/zookeeper/metadata/ZookeeperMetadataStoreTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2020 the original author or authors.
2+
* Copyright 2015-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -56,7 +56,7 @@ public class ZookeeperMetadataStoreTests extends ZookeeperTestSupport {
5656
@BeforeEach
5757
public void setUp() {
5858
super.setUp();
59-
this.metadataStore = new ZookeeperMetadataStore(client);
59+
this.metadataStore = new ZookeeperMetadataStore(this.client);
6060
this.metadataStore.start();
6161
}
6262

@@ -65,6 +65,7 @@ public void setUp() {
6565
public void tearDown() throws Exception {
6666
this.metadataStore.stop();
6767
this.client.delete().deletingChildrenIfNeeded().forPath(this.metadataStore.getRoot());
68+
super.tearDown();
6869
}
6970

7071
@Test

0 commit comments

Comments
 (0)