xieyi888 commented on code in PR #3266: URL: https://github.com/apache/flink-cdc/pull/3266#discussion_r1590486774
########## flink-cdc-connect/flink-cdc-source-connectors/flink-connector-tidb-cdc/src/test/java/org/apache/flink/cdc/connectors/tidb/metrics/TiDBSourceMetricsTest.java: ########## @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.cdc.connectors.tidb.metrics; + +import org.apache.flink.metrics.Gauge; +import org.apache.flink.metrics.testutils.MetricListener; + +import org.junit.Before; +import org.junit.Test; + +import java.util.Optional; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +/** Unit test for {@link TiDBSourceMetrics}. */ +public class TiDBSourceMetricsTest { + private static final String FETCH_EVENTTIME_LAG = "currentFetchEventTimeLag"; Review Comment: > Maybe can use MetricNames.CURRENT_FETCH_EVENT_TIME_LAG Replace it? Thanks @czy006 , I had use MetricNames.CURRENT_EMIT_EVENT_TIME_LAG, MetricNames.CURRENT_FETCH_EVENT_TIME_LAG, MetricNames.SOURCE_IDLE_TIME instead -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org