yuxiqian commented on code in PR #4119:
URL: https://github.com/apache/flink-cdc/pull/4119#discussion_r2354002460


##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-mysql/src/test/java/org/apache/flink/cdc/connectors/mysql/source/MySqlTablePatternMatchingTest.java:
##########
@@ -280,6 +297,29 @@ void testMultipleRulesWithRealTables() throws Exception {
                 .containsExactlyInAnyOrder(expected);
     }
 
+    @Test
+    void testMatchingRealTablesWithSpacedRules() throws Exception {
+        String[] expected =
+                new String[] {
+                    "CreateTableEvent{tableId=db.tbl1, schema=columns={`id` 
INT NOT NULL}, primaryKeys=id, options=()}",
+                    "DataChangeEvent{tableId=db.tbl1, before=[], after=[17], 
op=INSERT, meta=()}",
+                    "CreateTableEvent{tableId=db2.tbl2, schema=columns={`id` 
INT NOT NULL}, primaryKeys=id, options=()}",
+                    "DataChangeEvent{tableId=db2.tbl2, before=[], after=[17], 
op=INSERT, meta=()}",
+                    "CreateTableEvent{tableId=db3.tbl3, schema=columns={`id` 
INT NOT NULL}, primaryKeys=id, options=()}",
+                    "DataChangeEvent{tableId=db3.tbl3, before=[], after=[17], 
op=INSERT, meta=()}"
+                };
+
+        Assertions.assertThat(
+                        getRealWorldMatchedTables(
+                                "db.tbl1 , db2.tbl\\.* , db3.tbl3", null, 
false, expected.length))
+                .containsExactly(expected);

Review Comment:
   minor: `containsExactlyInAnyOrder` might be more suitable, as we don't 
guarantee tables will be handled in alphabetical order.



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