hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1037015 - in /hbase/trunk: CHANGES.txt src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperNodeTracker.java
Date Fri, 19 Nov 2010 20:35:38 GMT
Author: apurtell
Date: Fri Nov 19 20:35:38 2010
New Revision: 1037015

URL: http://svn.apache.org/viewvc?rev=1037015&view=rev
Log:
HBASE-3252  TestZooKeeperNodeTracker sometimes fails due to a race condition in test notification

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperNodeTracker.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1037015&r1=1037014&r2=1037015&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Fri Nov 19 20:35:38 2010
@@ -687,6 +687,8 @@ Release 0.90.0 - Unreleased
    HBASE-3239  Handle null regions to flush in HLog.cleanOldLogs (Kannan
                Muthukkaruppan via JD)
    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

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperNodeTracker.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperNodeTracker.java?rev=1037015&r1=1037014&r2=1037015&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperNodeTracker.java
(original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperNodeTracker.java
Fri Nov 19 20:35:38 2010
@@ -118,6 +118,11 @@ public class TestZooKeeperNodeTracker {
     // Verify the thread doesn't have a node
     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
     TestingZKListener zkListener = new TestingZKListener(zk, node);
     zk.registerListener(zkListener);
@@ -144,11 +149,6 @@ public class TestZooKeeperNodeTracker {
     assertTrue(Bytes.equals(thread.tracker.getData(), dataOne));
     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
     assertNotNull(secondTracker.getData());
     assertNotNull(secondTracker.blockUntilAvailable());



Mime
View raw message