davidradl commented on code in PR #28106:
URL: https://github.com/apache/flink/pull/28106#discussion_r3187094712
##########
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/slowtaskdetector/ExecutionTimeBasedSlowTaskDetectorTest.java:
##########
@@ -204,6 +204,13 @@ void testMultipleJobVertexFinishedTaskExceedRatio() throws
Exception {
executionGraph.getJobVertex(jobVertex2.getID()).getTaskVertices()[2];
ev23.getCurrentExecutionAttempt().markFinished();
+ // Ensure that the still-running tasks have accumulated a strictly
larger execution time
+ // than the just-finished baseline tasks before invoking the detector.
Without this wait,
+ // on fast machines all of {start, markFinished, findSlowTasks} can
happen within the
+ // same millisecond, leaving the running tasks with execution time <=
baseline and
+ // making the test flaky.
+ Thread.sleep(10);
Review Comment:
Can you find a way to do this without a sleep? It is not good practise to
have sleeps in unit tests.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]