XComp commented on code in PR #21751:
URL: https://github.com/apache/flink/pull/21751#discussion_r1087810726
##########
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adaptive/AdaptiveSchedulerTest.java:
##########
@@ -585,7 +586,7 @@ public void testStatusMetrics() throws Exception {
// sleep a bit to ensure uptime is > 0
Thread.sleep(10L);
- assertThat(upTimeGauge.getValue()).isGreaterThan(0L);
+ CommonTestUtils.waitUntilCondition(() -> upTimeGauge.getValue() > 0L);
Review Comment:
The `Thread.sleep(10L)` can be removed if we add the waitUntil condition.
Additionally, the same pattern with `Thread.sleep` and `isGreatherThan` is
applied a few lines further down in the test code. We might want to update that
as well.
--
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]