maksaska commented on code in PR #277:
URL: https://github.com/apache/ignite-extensions/pull/277#discussion_r1665889101


##########
modules/cdc-ext/src/test/java/org/apache/ignite/cdc/kafka/CdcKafkaReplicationTest.java:
##########
@@ -139,11 +155,85 @@ public class CdcKafkaReplicationTest extends 
AbstractReplicationTest {
         return futs;
     }
 
+    /** {@inheritDoc} */
+    @Override protected void checkMetrics() throws 
IgniteInterruptedCheckedException {
+        super.checkMetrics();
+
+        for (AbstractKafkaToIgniteCdcStreamer k2i : k2is) {
+            KafkaToIgniteMetrics metrics = getFieldValue(k2i, "metrics");
+            MetricRegistryImpl mreg = getFieldValue(metrics, "mreg");
+            checkK2IMetrics(m -> mreg.<AtomicLongMetric>findMetric(m).value());
+        }
+    }
+
     /** {@inheritDoc} */
     @Override protected void checkConsumerMetrics(Function<String, Long> 
longMetric) {
-        
assertNotNull(longMetric.apply(IgniteToIgniteCdcStreamer.LAST_EVT_TIME));
-        assertNotNull(longMetric.apply(IgniteToIgniteCdcStreamer.EVTS_CNT));
-        assertNotNull(longMetric.apply(IgniteToKafkaCdcStreamer.BYTES_SENT));
+        assertNotNull(longMetric.apply(LAST_EVT_SNT_TIME));
+        assertNotNull(longMetric.apply(EVTS_SNT_CNT));
+        assertNotNull(longMetric.apply(BYTES_SNT));
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void checkMetricsCount(int putCnt, int rmvCnt) {
+        checkMetricsEventsCount(putCnt, rmvCnt, 
getConsumerEventsCount(EVTS_SNT_CNT));
+
+        checkMetricsEventsCount(putCnt, rmvCnt, 
getKafkaConsumerEventsCount(EVTS_RSVD_CNT));

Review Comment:
   Renamed it



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to