zhangmeng916 commented on a change in pull request #1537:
URL: https://github.com/apache/helix/pull/1537#discussion_r526501065



##########
File path: 
helix-core/src/test/java/org/apache/helix/integration/task/TestDeleteJobFromJobQueue.java
##########
@@ -69,7 +69,14 @@ public void testForceDeleteJobFromJobQueue() throws 
InterruptedException {
     Assert
         
.assertNotNull(_driver.getJobContext(TaskUtil.getNamespacedJobName(jobQueueName,
 "job2")));
 
-    // The following force delete for the job should go through without 
getting an exception
+    // Force deletion can have Exception thrown as controller is writing to 
propertystore path too.
+    // https://github.com/apache/helix/issues/1406, also force deletion may 
not be safe.
+    // Thus, we stop pipeline to make sure there is not such race condition.
+    _gSetupTool.getClusterManagementTool().enableCluster(CLUSTER_NAME, false);
+    Thread.sleep(3000);
+    // note this sleep is critical as it would take time for controller to 
stop.

Review comment:
       Can you change to "TODO", and put before the sleep line?

##########
File path: 
helix-core/src/test/java/org/apache/helix/integration/messaging/TestP2PNoDuplicatedMessage.java
##########
@@ -174,7 +174,10 @@ public void testP2PStateTransitionEnabled() {
       verifyP2PEnabled(startTime);
     }
 
-    Assert.assertEquals(p2pTrigged, total);
+    // The success rate really depends on how quick participant act in 
relationship with controller.
+    // For now, we set 90% threshold.
+    long threshold = Math.round(total * 0.9);

Review comment:
       Please make sure other reviewers are ok with this too.




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