Amend HBASE-2742 Fix intermittent TestZKLeaderManager failure

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1203841 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Helmling 2011-11-18 21:08:38 +00:00
parent b5f5e2aeeb
commit a2de91f85b
1 changed files with 3 additions and 3 deletions

View File

@ -149,7 +149,7 @@ public class TestZKLeaderManager {
assertNotNull("Leader should exist", currentLeader);
LOG.debug("Current leader index is "+currentLeader.getIndex());
byte[] znodeData = ZKUtil.getData(CANDIDATES[0].getWatcher(), LEADER_ZNODE);
byte[] znodeData = ZKUtil.getData(currentLeader.getWatcher(), LEADER_ZNODE);
assertNotNull("Leader znode should contain leader index", znodeData);
assertTrue("Leader znode should not be empty", znodeData.length > 0);
int storedIndex = Bytes.toInt(znodeData);
@ -167,7 +167,7 @@ public class TestZKLeaderManager {
assertNotNull("New leader should exist after abdication", currentLeader);
LOG.debug("New leader index is "+currentLeader.getIndex());
znodeData = ZKUtil.getData(CANDIDATES[0].getWatcher(), LEADER_ZNODE);
znodeData = ZKUtil.getData(currentLeader.getWatcher(), LEADER_ZNODE);
assertNotNull("Leader znode should contain leader index", znodeData);
assertTrue("Leader znode should not be empty", znodeData.length > 0);
storedIndex = Bytes.toInt(znodeData);
@ -185,7 +185,7 @@ public class TestZKLeaderManager {
assertNotNull("New leader should exist after stop", currentLeader);
LOG.debug("New leader index is "+currentLeader.getIndex());
znodeData = ZKUtil.getData(CANDIDATES[0].getWatcher(), LEADER_ZNODE);
znodeData = ZKUtil.getData(currentLeader.getWatcher(), LEADER_ZNODE);
assertNotNull("Leader znode should contain leader index", znodeData);
assertTrue("Leader znode should not be empty", znodeData.length > 0);
storedIndex = Bytes.toInt(znodeData);