Merge pull request #2154 from navis/fix-testfail-WorkerTaskMonitorTest

Fix sporadic fail of WorkerTaskMonitorTest#testRunTask
This commit is contained in:
Fangjin Yang 2015-12-23 20:52:33 -08:00
commit 9aa62e4631
1 changed files with 5 additions and 5 deletions

View File

@ -203,10 +203,6 @@ public class WorkerTaskMonitorTest
@Test
public void testRunTask() throws Exception
{
cf.create()
.creatingParentsIfNeeded()
.forPath(joiner.join(tasksPath, task.getId()), jsonMapper.writeValueAsBytes(task));
Assert.assertTrue(
TestUtils.conditionValid(
new IndexingServiceCondition()
@ -225,6 +221,10 @@ public class WorkerTaskMonitorTest
)
);
cf.create()
.creatingParentsIfNeeded()
.forPath(joiner.join(tasksPath, task.getId()), jsonMapper.writeValueAsBytes(task));
Assert.assertTrue(
TestUtils.conditionValid(
new IndexingServiceCondition()
@ -340,7 +340,7 @@ public class WorkerTaskMonitorTest
}
)
);
// ephermal owner is 0 is created node is PERSISTENT
// ephemeral owner is 0 is created node is PERSISTENT
Assert.assertEquals(0, cf.checkExists().forPath(joiner.join(statusPath, task.getId())).getEphemeralOwner());
}