HBASE-3252 TestZooKeeperNodeTracker sometimes fails due to a race condition in test notification
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1037015 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c7708c5390
commit
3f82b6fcaf
|
@ -687,6 +687,8 @@ Release 0.90.0 - Unreleased
|
||||||
HBASE-3239 Handle null regions to flush in HLog.cleanOldLogs (Kannan
|
HBASE-3239 Handle null regions to flush in HLog.cleanOldLogs (Kannan
|
||||||
Muthukkaruppan via JD)
|
Muthukkaruppan via JD)
|
||||||
HBASE-3237 Split request accepted -- BUT CURRENTLY A NOOP
|
HBASE-3237 Split request accepted -- BUT CURRENTLY A NOOP
|
||||||
|
HBASE-3252 TestZooKeeperNodeTracker sometimes fails due to a race condition
|
||||||
|
in test notification (Gary Helmling via Andrew Purtell)
|
||||||
|
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
|
@ -118,6 +118,11 @@ public class TestZooKeeperNodeTracker {
|
||||||
// Verify the thread doesn't have a node
|
// Verify the thread doesn't have a node
|
||||||
assertFalse(thread.hasData);
|
assertFalse(thread.hasData);
|
||||||
|
|
||||||
|
// Now, start a new ZKNT with the node already available
|
||||||
|
TestTracker secondTracker = new TestTracker(zk, node, null);
|
||||||
|
secondTracker.start();
|
||||||
|
zk.registerListener(secondTracker);
|
||||||
|
|
||||||
// Put up an additional zk listener so we know when zk event is done
|
// Put up an additional zk listener so we know when zk event is done
|
||||||
TestingZKListener zkListener = new TestingZKListener(zk, node);
|
TestingZKListener zkListener = new TestingZKListener(zk, node);
|
||||||
zk.registerListener(zkListener);
|
zk.registerListener(zkListener);
|
||||||
|
@ -144,11 +149,6 @@ public class TestZooKeeperNodeTracker {
|
||||||
assertTrue(Bytes.equals(thread.tracker.getData(), dataOne));
|
assertTrue(Bytes.equals(thread.tracker.getData(), dataOne));
|
||||||
LOG.info("Successfully got data one");
|
LOG.info("Successfully got data one");
|
||||||
|
|
||||||
// Now, start a new ZKNT with the node already available
|
|
||||||
TestTracker secondTracker = new TestTracker(zk, node, null);
|
|
||||||
secondTracker.start();
|
|
||||||
zk.registerListener(secondTracker);
|
|
||||||
|
|
||||||
// Make sure it's available and with the expected data
|
// Make sure it's available and with the expected data
|
||||||
assertNotNull(secondTracker.getData());
|
assertNotNull(secondTracker.getData());
|
||||||
assertNotNull(secondTracker.blockUntilAvailable());
|
assertNotNull(secondTracker.blockUntilAvailable());
|
||||||
|
|
Loading…
Reference in New Issue