From 1c0a06193e145e0ecbef46706553ed1c1b078136 Mon Sep 17 00:00:00 2001 From: stack Date: Wed, 26 Nov 2014 12:53:54 -0800 Subject: [PATCH] HBASE-12587 TestReplicationTrackerZKImpl.testPeerRemovedEvent timedout --- .../replication/TestReplicationTrackerZKImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationTrackerZKImpl.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationTrackerZKImpl.java index 72cbf8f0bc1..38e6fcfbaf2 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationTrackerZKImpl.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationTrackerZKImpl.java @@ -162,11 +162,13 @@ public class TestReplicationTrackerZKImpl { zkw.getRecoverableZooKeeper().getZooKeeper().getChildren("/hbase/replication/peers/5", true); rt.registerListener(new DummyReplicationListener()); rp.disablePeer("5"); + int tmp = plChangedCount.get(); + LOG.info("Peer count=" + tmp); ZKUtil.deleteNode(zkw, "/hbase/replication/peers/5/peer-state"); // wait for event - int tmp = plChangedCount.get(); while (plChangedCount.get() <= tmp) { - Thread.sleep(5); + Thread.sleep(100); + LOG.info("Peer count=" + tmp); } assertEquals(1, plChangedData.size()); assertTrue(plChangedData.contains("5")); @@ -220,8 +222,8 @@ public class TestReplicationTrackerZKImpl { public void peerListChanged(List peerIds) { plChangedData.clear(); plChangedData.addAll(peerIds); - plChangedCount.getAndIncrement(); - LOG.debug("Received peerListChanged event"); + int count = plChangedCount.getAndIncrement(); + LOG.debug("Received peerListChanged event " + count); } }