HBASE-10130 TestSplitLogManager#testTaskResigned fails sometimes

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1556040 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2014-01-06 21:31:28 +00:00
parent 0525f2c876
commit b7427d664b
1 changed files with 3 additions and 3 deletions

View File

@ -381,10 +381,10 @@ public class TestSplitLogManager {
ZKUtil.setData(zkw, tasknode, slt.toByteArray()); ZKUtil.setData(zkw, tasknode, slt.toByteArray());
int version = ZKUtil.checkExists(zkw, tasknode); int version = ZKUtil.checkExists(zkw, tasknode);
// Could be small race here. // Could be small race here.
if (tot_mgr_resubmit.get() == 0) waitForCounter(tot_mgr_resubmit, 0, 1, to/2); if (tot_mgr_resubmit.get() == 0) {
waitForCounter(tot_mgr_resubmit, 0, 1, to/2);
}
assertEquals(tot_mgr_resubmit.get(), 1); assertEquals(tot_mgr_resubmit.get(), 1);
int version1 = ZKUtil.checkExists(zkw, tasknode);
assertTrue("version1=" + version1 + ", version=" + version, version1 > version);
byte[] taskstate = ZKUtil.getData(zkw, tasknode); byte[] taskstate = ZKUtil.getData(zkw, tasknode);
slt = SplitLogTask.parseFrom(taskstate); slt = SplitLogTask.parseFrom(taskstate);