use of org.apache.helix.task.TaskState in project helix by apache.
the class TestWorkflowAndJobPoll method testJobPoll.
@Test
public void testJobPoll() throws InterruptedException {
String jobResource = TestHelper.getTestMethodName();
Workflow.Builder builder = WorkflowGenerator.generateDefaultSingleJobWorkflowBuilder(jobResource);
_driver.start(builder.build());
TaskState polledState = _driver.pollForJobState(jobResource, String.format("%s_%s", jobResource, jobResource), 4000L, TaskState.COMPLETED, TaskState.FAILED);
Assert.assertEquals(TaskState.COMPLETED, polledState);
}
Aggregations