Fix sporadic fail of WorkerTaskMonitorTest#testRunTask

This commit is contained in:
navis.ryu 2015-12-24 02:31:30 +09:00
parent 508629916d
commit a8f6c6110d

View File

@ -202,10 +202,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()
@ -224,6 +220,10 @@ public class WorkerTaskMonitorTest
)
);
cf.create()
.creatingParentsIfNeeded()
.forPath(joiner.join(tasksPath, task.getId()), jsonMapper.writeValueAsBytes(task));
Assert.assertTrue(
TestUtils.conditionValid(
new IndexingServiceCondition()
@ -339,7 +339,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());
}