From fa7edd602fcb0ae90465322345271ebbf1cfd900 Mon Sep 17 00:00:00 2001 From: sukang Date: Thu, 23 Jan 2025 23:06:08 +0800 Subject: [PATCH] fix-1 --- .../flink/cdc/connectors/mongodb/MongoDBMetricCase.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/src/test/java/org/apache/flink/cdc/connectors/mongodb/MongoDBMetricCase.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/src/test/java/org/apache/flink/cdc/connectors/mongodb/MongoDBMetricCase.java index 00beffdce..37b7aac3b 100644 --- a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/src/test/java/org/apache/flink/cdc/connectors/mongodb/MongoDBMetricCase.java +++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/src/test/java/org/apache/flink/cdc/connectors/mongodb/MongoDBMetricCase.java @@ -63,14 +63,13 @@ public class MongoDBMetricCase extends MongoDBSourceTestBase { .hosts(mongoContainer.getHostAndPort()) .username(FLINK_USER) .password(FLINK_USER_PASSWORD) - .databaseList(customerDatabase) // 设置捕获的数据库,支持正则表达式 + .databaseList(customerDatabase) .collectionList( getCollectionNameRegex( - customerDatabase, - new String[] {"customers"})) // 设置捕获的集合,支持正则表达式 + customerDatabase, new String[] {"customers"})) .deserializer(new JsonDebeziumDeserializationSchema()) .build(); - DataStreamSource stream = env.addSource(sourceFunction, "MongoDB"); + DataStreamSource stream = env.addSource(sourceFunction, "MongoDB CDC Source"); CollectResultIterator iterator = addCollector(env, stream); JobClient jobClient = env.executeAsync(); iterator.setJobClient(jobClient); @@ -87,7 +86,7 @@ public class MongoDBMetricCase extends MongoDBSourceTestBase { // Check metrics List metricGroups = - metricReporter.findOperatorMetricGroups(jobClient.getJobID(), "MongoDB"); + metricReporter.findOperatorMetricGroups(jobClient.getJobID(), "MongoDB CDC Source"); // There should be only 1 parallelism of source, so it's safe to get the only group OperatorMetricGroup group = metricGroups.get(0);