hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1410200 - /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/coprocessor/example/TestZooKeeperScanPolicyObserver.java
Date Fri, 16 Nov 2012 05:25:12 GMT
Author: larsh
Date: Fri Nov 16 05:25:11 2012
New Revision: 1410200

URL: http://svn.apache.org/viewvc?rev=1410200&view=rev
Log:
HBASE-7177 TestZooKeeperScanPolicyObserver.testScanPolicyObserver is flaky

Modified:
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/coprocessor/example/TestZooKeeperScanPolicyObserver.java

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/coprocessor/example/TestZooKeeperScanPolicyObserver.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/coprocessor/example/TestZooKeeperScanPolicyObserver.java?rev=1410200&r1=1410199&r2=1410200&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/coprocessor/example/TestZooKeeperScanPolicyObserver.java
(original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/coprocessor/example/TestZooKeeperScanPolicyObserver.java
Fri Nov 16 05:25:11 2012
@@ -84,9 +84,13 @@ public class TestZooKeeperScanPolicyObse
     // let's say test last backup was 1h ago
     // using plain ZK here, because RecoverableZooKeeper add extra encoding to the data
     zk.setData(ZooKeeperScanPolicyObserver.node, Bytes.toBytes(now - 3600*1000), -1);
-    
+
     LOG.debug("Set time: "+Bytes.toLong(Bytes.toBytes(now - 3600*1000)));
 
+    // sleep for 1s to give the ZK change a chance to reach the watcher in the observer.
+    // TODO: Better to wait for the data to be propagated
+    Thread.sleep(1000);
+
     long ts = now - 2000;
     Put p = new Put(R);
     p.add(F, Q, ts, Q);



Mime
View raw message