danzhewuju commented on code in PR #4297:
URL: https://github.com/apache/flink-cdc/pull/4297#discussion_r3575691052


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/test/java/org/apache/flink/cdc/connectors/mysql/debezium/reader/BinlogSplitReaderTest.java:
##########
@@ -1131,15 +1131,16 @@ void 
testRestoreFromCheckpointWithTimestampStartingOffset() throws Exception {
         // Restore binlog reader from checkpoint
         binlogReader.submitSplit(checkpointSplit);
 
-        // We mock a WRITE_ROWS event with timestamp = 1, which should be 
dropped by filter
+        // Restored checkpoint offsets are concrete positions, so we should 
not drop this event
+        // based on the original TIMESTAMP startup setting.
         EventHeaderV4 header = new EventHeaderV4();
         header.setEventType(EventType.WRITE_ROWS);
         header.setTimestamp(1L);
         Event event = new Event(header, new WriteRowsEventData());
 
-        // Check if the filter works
+        // Check that the restored reader keeps the event.
         Predicate<Event> eventFilter = 
binlogReader.getBinlogSplitReadTask().getEventFilter();
-        assertThat(eventFilter.test(event)).isFalse();

Review Comment:
   Thanks, I've added a unit test for this scenario.



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