kaisun2000 commented on a change in pull request #1346:
URL: https://github.com/apache/helix/pull/1346#discussion_r495612222



##########
File path: 
helix-core/src/test/java/org/apache/helix/integration/task/TestEnqueueJobs.java
##########
@@ -135,10 +146,18 @@ public void testQueueParallelJobs() throws 
InterruptedException {
             .setCommand(MockTask.TASK_COMMAND).setMaxAttemptsPerTask(2)
             
.setJobCommandConfigMap(Collections.singletonMap(MockTask.JOB_DELAY, "10000"));
 
+    _driver.waitToStop(queueName, 5000L);
+
     // Add 4 jobs to the queue
+    List<String> jobNames = new ArrayList<>();
+    List<JobConfig.Builder> jobBuilders = new ArrayList<>();
     for (int i = 0; i < numberOfJobsAddedBeforeControllerSwitch; i++) {
-      _driver.enqueueJob(queueName, "JOB" + i, jobBuilder);
+      jobNames.add("JOB" + i);
+      jobBuilders.add(jobBuilder);
     }
+    _driver.enqueueJobs(queueName, jobNames, jobBuilders);

Review comment:
       This fix only minimize the change, it does not really eliminate the 
chance.
   
   The really issue is the race condition of workFlowControllerDataProvider 
updating sequence and job config and workflow config updating sequence. I will 
write a doc later to illustrate the cases here and potentially proposed 
solution. 




----------------------------------------------------------------
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]

Reply via email to