// Ensure successful completion
String namespacedJob1 = queueName + "_masterJob";
String namespacedJob2 = queueName + "_slaveJob";
TestUtil.pollForJobState(_manager, queueName, namespacedJob1, TaskState.COMPLETED);
TestUtil.pollForJobState(_manager, queueName, namespacedJob2, TaskState.COMPLETED);
JobContext masterJobContext = TaskUtil.getJobContext(_manager, namespacedJob1);
JobContext slaveJobContext = TaskUtil.getJobContext(_manager, namespacedJob2);
// Ensure correct ordering
long job1Finish = masterJobContext.getFinishTime();
long job2Start = slaveJobContext.getStartTime();
Assert.assertTrue(job2Start >= job1Finish);
// Flush queue and check cleanup
_driver.flushQueue(queueName);
HelixDataAccessor accessor = _manager.getHelixDataAccessor();