YuanHanzhong commented on code in PR #28191:
URL: https://github.com/apache/flink/pull/28191#discussion_r3262877136
##########
flink-connectors/flink-connector-base/src/test/java/org/apache/flink/connector/base/source/hybrid/HybridSourceReaderTest.java:
##########
@@ -282,6 +282,36 @@ void testReaderRecovery() throws Exception {
reader.close();
}
+ @Test
+ void testReaderRecoverySnapshotBeforeSwitchSourceEvent() throws Exception {
+ TestingReaderContext readerContext = new TestingReaderContext();
+ MockBaseSource source = new MockBaseSource(1, 1, Boundedness.BOUNDED);
+
+ HybridSourceReader<Integer> reader = new
HybridSourceReader<>(readerContext);
+ reader.start();
+ assertAndClearSourceReaderFinishedEvent(readerContext, -1);
+ reader.handleSourceEvents(new SwitchSourceEvent(0, source, false));
+
+ MockSourceSplit mockSplit = new MockSourceSplit(0, 0, 2147483647);
Review Comment:
Good catch, thanks. I switched this to Integer.MAX_VALUE and reran the
focused HybridSourceReader test:
`./mvnw -pl flink-connectors/flink-connector-base -DskipITs
-Dtest=HybridSourceReaderTest#testReaderRecoverySnapshotBeforeSwitchSourceEvent
-Dsurefire.failIfNoSpecifiedTests=false test`
--
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]