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

Hang Ruan commented on FLINK-23971:
-----------------------------------

There is a problem in the test method _matchesMultipleSplitTestData._ When 
there are the same records between two split, the test may fail.

For example, there are totally two splits for the test. And the first split 
records is like \{a,b,b,c}, the second split records is like \{a,b,c,d}. The 
final result is \{a,a,b,c,d,b,b,c}. It is a right result, but the test will 
fail.

I think we need to add a prefix for each record in different splits, like 
"0-XXXXXX" for the first split. Then the test will return the right judgement.

The test should fail in both _testMultipleSplits_ and _testIdleReader_ test 
case. But only the latter test case occurs, and the problem probability is 
supposed to be very low. Maybe we need more evidence about it.

> PulsarSourceITCase.testIdleReader failed on azure
> -------------------------------------------------
>
>                 Key: FLINK-23971
>                 URL: https://issues.apache.org/jira/browse/FLINK-23971
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / Pulsar
>    Affects Versions: 1.14.0
>            Reporter: Roman Khachatryan
>            Priority: Blocker
>              Labels: test-stability
>             Fix For: 1.14.0
>
>
> {code:java}
> [INFO] Running org.apache.flink.connector.pulsar.source.PulsarSourceITCase
> [ERROR] Tests run: 8, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 
> 353.527 s <<< FAILURE! - in 
> org.apache.flink.connector.pulsar.source.PulsarSourceITCase
> [ERROR] testIdleReader{TestEnvironment, ExternalContext}[2]  Time elapsed: 
> 4.549 s  <<< FAILURE!
> java.lang.AssertionError:
> Expected: Records consumed by Flink should be identical to test data and 
> preserve the order in multiple splits
>      but: Unexpected record 'tj7MpFRWX95GzBpSF3CCjxKSal6bRhR0aF'
>    at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
>    at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
>    at 
> org.apache.flink.connectors.test.common.testsuites.SourceTestSuiteBase.testIdleReader(SourceTestSuiteBase.java:193)
> {code}
> [https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=22819&view=logs&j=fc5181b0-e452-5c8f-68de-1097947f6483&t=995c650b-6573-581c-9ce6-7ad4cc038461&l=24448]
> This is the same error as in FLINK-23828 (kafka).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to