HBASE-8586 Revisit of hbase-8483, "HConnectionManager can leak ZooKeeper connections when using deleteStaleConnection"
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1484925 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8aeeb222a1
commit
4f45d96ab1
|
@ -817,7 +817,7 @@ public class TestHCM {
|
||||||
config.setInt("zookeeper.recovery.retry", 1);
|
config.setInt("zookeeper.recovery.retry", 1);
|
||||||
config.setInt("zookeeper.recovery.retry.intervalmill", 1000);
|
config.setInt("zookeeper.recovery.retry.intervalmill", 1000);
|
||||||
config.setInt("hbase.rpc.timeout", 2000);
|
config.setInt("hbase.rpc.timeout", 2000);
|
||||||
config.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 2);
|
config.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 1);
|
||||||
|
|
||||||
ThreadPoolExecutor pool = new ThreadPoolExecutor(1, 10,
|
ThreadPoolExecutor pool = new ThreadPoolExecutor(1, 10,
|
||||||
5, TimeUnit.SECONDS,
|
5, TimeUnit.SECONDS,
|
||||||
|
@ -866,7 +866,7 @@ public class TestHCM {
|
||||||
if (((ZooKeeperWatcher)watcher).getRecoverableZooKeeper().getState().isAlive()) {
|
if (((ZooKeeperWatcher)watcher).getRecoverableZooKeeper().getState().isAlive()) {
|
||||||
// non-synchronized access to watcher; sleep and check again in case zk connection
|
// non-synchronized access to watcher; sleep and check again in case zk connection
|
||||||
// hasn't been cleaned up yet.
|
// hasn't been cleaned up yet.
|
||||||
Thread.sleep(50);
|
Thread.sleep(1000);
|
||||||
if (((ZooKeeperWatcher) watcher).getRecoverableZooKeeper().getState().isAlive()) {
|
if (((ZooKeeperWatcher) watcher).getRecoverableZooKeeper().getState().isAlive()) {
|
||||||
pool.shutdownNow();
|
pool.shutdownNow();
|
||||||
fail("Live zookeeper in closed connection");
|
fail("Live zookeeper in closed connection");
|
||||||
|
|
Loading…
Reference in New Issue