Skip to content

Commit

Permalink
zk restart
Browse files Browse the repository at this point in the history
  • Loading branch information
ihaolin committed Mar 3, 2017
1 parent a48328d commit 8a3baff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ public byte[] get(String path){
return client.getData().forPath(path);
} catch (Exception e){
handleConnectionLoss(e);
throw new ZkException("failed to get path data");
throw new ZkException(e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ public void testLock() throws InterruptedException {
}
}

@Test
public void testZkClientRestart(){

zk.get("/jobs");

zk.restart();

zk.get("/jobs");
}

@After
public void destroy(){
if (zk != null){
Expand Down

0 comments on commit 8a3baff

Please sign in to comment.