Martijn Visser created FLINK-40009:
--------------------------------------

             Summary: RescaleTimelineITCase
                 Key: FLINK-40009
                 URL: https://issues.apache.org/jira/browse/FLINK-40009
             Project: Flink
          Issue Type: Bug
          Components: Runtime / Coordination, Tests
    Affects Versions: 2.4.0
            Reporter: Martijn Visser
            Assignee: Martijn Visser


RescaleTimelineITCase can hang until the CI watchdog kills the fork. A thread 
dump
from build 76242 showed waitUntilConditionWithTimeout still parked after 978s 
on a
20s budget.

https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=76242&view=results
 (leg: test_cron_jdk11 core)

Root cause: {{waitUntilConditionWithTimeout}} wrapped an unbounded
{{CommonTestUtils#waitUntilCondition}} in {{CompletableFuture#runAsync}} and 
bounded
it with {{get(timeout)}}. When the test runs on a ForkJoinPool worker (JUnit 
5's test
executor), {{CompletableFuture#timedGet}} help-executes the async task inline, 
so the
never-ending poll loop runs on the waiting thread itself and the timeout never 
fires.

Fix: poll synchronously on the calling thread against a {{Deadline}} so the 
timeout is
always enforced and no task is leaked into the common pool.

Related: FLINK-39902, FLINK-39903 (same test class).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to