[ 
https://issues.apache.org/jira/browse/FLINK-38404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18028498#comment-18028498
 ] 

Mingliang Liu commented on FLINK-38404:
---------------------------------------

[~ruanhang1993] I agree with David it's a data race. The job starts with 
CREATED and transition to RUNNING when scheduling starts. It's possible the 
JobStatusListener is registered while the job is still in CREATED state. In 
other words, the CREATED → RUNNING → FAILING → FAILED is the right sequence, no 
matter the CREATED state is captured or not in the test. The CREATED state 
seems safe to be ignored for tests that test that the job execution is failed 
if the TaskExecutor disconnects from the JobMaster or heartbeat times out. So 
my proposal is to tolerate that here. A simple way is just to replace 
{{assertExactly}} with {{containsSubsequence}} in the tests. I attached a 
simple [PR|https://github.com/apache/flink/pull/27091] for discussion.

> JobMasterTest failed in test_cron_adaptive_scheduler core
> ---------------------------------------------------------
>
>                 Key: FLINK-38404
>                 URL: https://issues.apache.org/jira/browse/FLINK-38404
>             Project: Flink
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 2.2.0
>            Reporter: Ruan Hang
>            Priority: Blocker
>              Labels: pull-request-available
>
> Details:
> https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=69810&view=logs&j=0e7be18f-84f2-53f0-a32d-4a5e4a174679&t=e5d1f098-1b8a-567f-cd4a-8ebd15edecc5



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

Reply via email to