spuru9 commented on code in PR #28191:
URL: https://github.com/apache/flink/pull/28191#discussion_r3260495950


##########
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:
   nit: Use Integer.MAX_VALUE rather than the magic literal 2147483647



-- 
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]

Reply via email to