Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public void stateChanged(CuratorFramework client, ConnectionState newState) {
try {
client.checkExists().forPath("/");
fail("Connection should be down");
} catch (KeeperException.ConnectionLossException e) {
} catch (KeeperException.ConnectionLossException | KeeperException.SessionExpiredException e) {
// expected
}

Expand Down
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems these changes cause compile fail. Why do you make these changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tisonkun Thank-you for taking a look at the PR. It seems like in the newer version of zookeeper, the method that was being overridden has become final, so I just altered the access method to it.

Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void close() throws IOException {

try {
if (zkServer != null) {
zkServer.shutdown();
zkServer.customShutdown();
ZKDatabase zkDb = zkServer.getZKDatabase();
if (zkDb != null) {
// make ZK server close its log files
Expand Down Expand Up @@ -209,7 +209,7 @@ private void internalRunFromConfig(ServerConfig config) throws IOException {
latch.countDown();
cnxnFactory.join();
if ((zkServer != null) && zkServer.isRunning()) {
zkServer.shutdown();
zkServer.customShutdown();
}
} catch (InterruptedException e) {
// warn, but generally this is ok
Expand Down Expand Up @@ -255,9 +255,8 @@ public TestZooKeeperServer(FileTxnSnapLog txnLog, ServerConfig config) {
this.setMaxSessionTimeout(config.getMaxSessionTimeout());
}

@Override
public synchronized void shutdown(boolean fullyShutDown) {
super.shutdown(fullyShutDown);
public synchronized void customShutdown() {
super.shutdown();
try {
txnLog.close();
} catch (IOException e) {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<redirectTestOutputToFile>true</redirectTestOutputToFile>

<!-- versions -->
<zookeeper-version>3.9.2</zookeeper-version>
<zookeeper-version>3.9.3</zookeeper-version>
<maven-bundle-plugin-version>5.1.4</maven-bundle-plugin-version>
<maven-compiler-plugin-version>3.10.0</maven-compiler-plugin-version>
<maven-dependency-plugin-version>3.2.0</maven-dependency-plugin-version>
Expand Down