Skip to content

Commit 8f43c75

Browse files
aminadinari19Amina Dinarikezhuw
authored
GH-1251: Upgrade Zookeeper to 3.9.3 (#1252)
Closes #1251. Co-authored-by: Amina Dinari <[email protected]> Co-authored-by: Kezhu Wang <[email protected]>
1 parent bc30bb2 commit 8f43c75

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

curator-framework/src/test/java/org/apache/curator/framework/imps/TestFramework.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ public void stateChanged(CuratorFramework client, ConnectionState newState) {
479479
try {
480480
client.checkExists().forPath("/");
481481
fail("Connection should be down");
482-
} catch (KeeperException.ConnectionLossException e) {
482+
} catch (KeeperException.ConnectionLossException | KeeperException.SessionExpiredException e) {
483483
// expected
484484
}
485485

curator-test/src/main/java/org/apache/curator/test/TestingZooKeeperMain.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public void close() throws IOException {
165165

166166
try {
167167
if (zkServer != null) {
168-
zkServer.shutdown();
168+
zkServer.customShutdown();
169169
ZKDatabase zkDb = zkServer.getZKDatabase();
170170
if (zkDb != null) {
171171
// make ZK server close its log files
@@ -209,7 +209,7 @@ private void internalRunFromConfig(ServerConfig config) throws IOException {
209209
latch.countDown();
210210
cnxnFactory.join();
211211
if ((zkServer != null) && zkServer.isRunning()) {
212-
zkServer.shutdown();
212+
zkServer.customShutdown();
213213
}
214214
} catch (InterruptedException e) {
215215
// warn, but generally this is ok
@@ -255,9 +255,8 @@ public TestZooKeeperServer(FileTxnSnapLog txnLog, ServerConfig config) {
255255
this.setMaxSessionTimeout(config.getMaxSessionTimeout());
256256
}
257257

258-
@Override
259-
public synchronized void shutdown(boolean fullyShutDown) {
260-
super.shutdown(fullyShutDown);
258+
public synchronized void customShutdown() {
259+
super.shutdown();
261260
try {
262261
txnLog.close();
263262
} catch (IOException e) {

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<redirectTestOutputToFile>true</redirectTestOutputToFile>
7373

7474
<!-- versions -->
75-
<zookeeper-version>3.9.2</zookeeper-version>
75+
<zookeeper-version>3.9.3</zookeeper-version>
7676
<maven-bundle-plugin-version>5.1.4</maven-bundle-plugin-version>
7777
<maven-compiler-plugin-version>3.10.0</maven-compiler-plugin-version>
7878
<maven-dependency-plugin-version>3.2.0</maven-dependency-plugin-version>

0 commit comments

Comments
 (0)