kaisun2000 commented on issue #1278:
URL: https://github.com/apache/helix/issues/1278#issuecomment-674458093
```
for (int i = 0; i < numberOfJobsAddedInitially; i++) {
_driver.pollForJobState(queueName,
TaskUtil.getNamespacedJobName(queueName, "JOB" + i),
TaskState.COMPLETED);
}
```
pollForJobState is following, timeout is 5 minutes. Enable to 15 minutes
with test case time to 10 minute to have a try. Also, add more about if ctx is
null or the other case.
```
long st = System.currentTimeMillis();
do {
Thread.sleep(timeToSleep);
ctx = getWorkflowContext(workflowName);
} while ((ctx == null || ctx.getJobState(jobName) == null
|| !allowedStates.contains(ctx.getJobState(jobName)))
&& System.currentTimeMillis() < st + timeout);
if (ctx == null || !allowedStates.contains(ctx.getJobState(jobName))) {
throw new HelixException(
String.format("Workflow \"%s\" context is null or job \"%s\" is
not in states: %s",
workflowName, jobName, allowedStates));
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]