[
https://issues.apache.org/jira/browse/FLINK-19427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17212322#comment-17212322
]
Stephan Ewen commented on FLINK-19427:
--------------------------------------
You are right. The test is somehow not correctly written.
What we really need to check here is the following: We must have either of the
following conditions being true:
- Either the fetcher was already set to idle when the thread pulled the fetch
from the queue, because that is when the reader thread is supposed to check for
fetcher being idle and shutting it down (which signals end of input)
- Or the fetcher was not yet marked idle, because the fetch was pulled before
that flag was set. In that case, the future must be complete, so that the
reader thread goes back to checking the fetcher.
I prepared a PR that changes this. As a side effect, this should also fix
FLINK-19489.
> SplitFetcherTest.testNotifiesWhenGoingIdleConcurrent is instable
> ----------------------------------------------------------------
>
> Key: FLINK-19427
> URL: https://issues.apache.org/jira/browse/FLINK-19427
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Common
> Affects Versions: 1.12.0
> Reporter: Dian Fu
> Assignee: Stephan Ewen
> Priority: Major
> Labels: test-stability
>
> https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=6983&view=logs&j=8fd975ef-f478-511d-4997-6f15fe8a1fd3&t=ac0fa443-5d45-5a6b-3597-0310ecc1d2ab
> {code}
> 2020-09-26T21:27:46.6223579Z [ERROR]
> testNotifiesWhenGoingIdleConcurrent(org.apache.flink.connector.base.source.reader.fetcher.SplitFetcherTest)
> Time elapsed: 0.602 s <<< FAILURE!
> 2020-09-26T21:27:46.6224448Z java.lang.AssertionError
> 2020-09-26T21:27:46.6224804Z at org.junit.Assert.fail(Assert.java:86)
> 2020-09-26T21:27:46.6225136Z at org.junit.Assert.assertTrue(Assert.java:41)
> 2020-09-26T21:27:46.6225498Z at org.junit.Assert.assertTrue(Assert.java:52)
> 2020-09-26T21:27:46.6225984Z at
> org.apache.flink.connector.base.source.reader.fetcher.SplitFetcherTest.testNotifiesWhenGoingIdleConcurrent(SplitFetcherTest.java:129)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)