lhotari commented on code in PR #25358:
URL: https://github.com/apache/pulsar/pull/25358#discussion_r2958446850


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ReplicatorTest.java:
##########
@@ -1046,8 +1046,10 @@ public void 
testResumptionAfterBacklogRelaxed(RetentionPolicy policy) throws Exc
 
         metrics = metricReader1.collectAllMetrics();
         assertMetricLongSumValue(metrics, 
OpenTelemetryReplicatorStats.BACKLOG_COUNTER, attributes, 1);
+        // The delay can be 0.0 when the replicator producer is stopped (e.g. 
due to backlog quota),
+        // because AbstractReplicator.getReplicationDelayMs() returns 0 when 
producer is null.
         assertMetricDoubleGaugeValue(metrics, 
OpenTelemetryReplicatorStats.DELAY_GAUGE, attributes,
-                aDouble -> assertThat(aDouble).isPositive());
+                aDouble -> assertThat(aDouble).isGreaterThanOrEqualTo(0.0));

Review Comment:
   This assertion is not very useful at the moment in this test since the 
assertion will always be true.



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