Dennis-Mircea commented on code in PR #28106:
URL: https://github.com/apache/flink/pull/28106#discussion_r3194158153
##########
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:
`Thread.sleep(10)` is now replaced with `zeroOutFinishedExecutionTime(ev)`,
which mutates the public `getStateTimestamps()` array to pin
`FINISHED` to `DEPLOYING`. This drives the baseline to 0 deterministically
without any timing dependency.
--
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]