You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/08/15 23:48:47 UTC

[GitHub] [helix] kaisun2000 opened a new issue #1279: fix flaky test TestGetLastScheduledTaskExecInfo.testGetLastScheduledTaskExecInfo

kaisun2000 opened a new issue #1279:
URL: https://github.com/apache/helix/issues/1279


   github log:
   
   > 2020-08-14T19:59:31.4007676Z [ERROR]   TestGetLastScheduledTaskExecInfo.testGetLastScheduledTaskExecInfo:84->setupTasks:150 expected:<true> but was:<false>
   
   2020-08-14T19:59:31.0089609Z [ERROR] testGetLastScheduledTaskExecInfo(org.apache.helix.task.TestGetLastScheduledTaskExecInfo)  Time elapsed: 27.57 s  <<< FAILURE!
   2020-08-14T19:59:31.0093764Z java.lang.AssertionError: expected:<true> but was:<false>
   2020-08-14T19:59:31.0100939Z 	at org.apache.helix.task.TestGetLastScheduledTaskExecInfo.setupTasks(TestGetLastScheduledTaskExecInfo.java:150)
   2020-08-14T19:59:31.0109245Z 	at org.apache.helix.task.TestGetLastScheduledTaskExecInfo.testGetLastScheduledTaskExecInfo(TestGetLastScheduledTaskExecInfo.java:84)


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] kaisun2000 commented on issue #1279: fix flaky test TestGetLastScheduledTaskExecInfo.testGetLastScheduledTaskExecInfo

Posted by GitBox <gi...@apache.org>.
kaisun2000 commented on issue #1279:
URL: https://github.com/apache/helix/issues/1279#issuecomment-674458879


   ```
       boolean haveExpectedNumberOfTasksScheduled = TestHelper.verify(() -> {
         int scheduleTask = 0;
         WorkflowConfig workflowConfig =
             TaskUtil.getWorkflowConfig(_manager.getHelixDataAccessor(), jobQueueName);
         for (String job : workflowConfig.getJobDag().getAllNodes()) {
           JobContext jobContext = _driver.getJobContext(job);
           Set<Integer> allPartitions = jobContext.getPartitionSet();
           for (Integer partition : allPartitions) {
             String timestamp = jobContext.getMapField(partition).get(TASK_START_TIME_KEY);
             if (timestamp != null) {
               scheduleTask++;
             }
           }
         }
         return (scheduleTask == expectedScheduledTasks);
       }, TestHelper.WAIT_DURATION);
       Assert.assertTrue(haveExpectedNumberOfTasksScheduled);  --> failure 
   ```
   
   In setupTask, the TestHelper.WAIT_DURATION is only 20 sec, need to enlarge it. 
   
   Also, enhance logging of verify, if wait timeout, log error.
   
   ```
     public static boolean verify(Verifier verifier, long timeout) throws Exception {
       long start = System.currentTimeMillis();
       do {
         boolean result = verifier.verify();
         if (result || (System.currentTimeMillis() - start) > timeout) {
           return result;
         }
         Thread.sleep(50);
       } while (true);
     }
   
   
   ```


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] kaisun2000 commented on issue #1279: fix flaky test TestGetLastScheduledTaskExecInfo.testGetLastScheduledTaskExecInfo

Posted by GitBox <gi...@apache.org>.
kaisun2000 commented on issue #1279:
URL: https://github.com/apache/helix/issues/1279#issuecomment-674460115


   Some root cause as #1277 


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] jiajunwang commented on issue #1279: fix flaky test TestGetLastScheduledTaskExecInfo.testGetLastScheduledTaskExecInfo

Posted by GitBox <gi...@apache.org>.
jiajunwang commented on issue #1279:
URL: https://github.com/apache/helix/issues/1279#issuecomment-849103143


   Close test unstable tickets since we have an automatic tracking mechanism https://github.com/apache/helix/pull/1757 now for tracking the most recent test issues.


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] jiajunwang closed issue #1279: fix flaky test TestGetLastScheduledTaskExecInfo.testGetLastScheduledTaskExecInfo

Posted by GitBox <gi...@apache.org>.
jiajunwang closed issue #1279:
URL: https://github.com/apache/helix/issues/1279


   


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org