dragosvictor commented on code in PR #22058:
URL: https://github.com/apache/pulsar/pull/22058#discussion_r1504885647
##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/BrokerServiceLookupTest.java:
##########
@@ -1125,6 +1201,17 @@ public void
testLookupConnectionNotCloseIfGetUnloadingExOrMetadataEx() throws Ex
assertTrue(lookupService instanceof BinaryProtoLookupService);
ClientCnx lookupConnection =
pulsarClientImpl.getCnxPool().getConnection(lookupService.resolveHost()).join();
+ var metricName = "pulsar.broker.lookup.request.duration";
+ var metricReader = pulsarTestContext.getOpenTelemetryMetricReader();
+ assertThat(metricReader.collectAllMetrics())
+ .noneSatisfy(metric -> assertThat(metric)
+ .hasName(metricName)
+ .hasHistogramSatisfying(histogram ->
histogram.hasPointsSatisfying(
+ point -> point
+
.hasAttributes(OpenTelemetryAttributes.PULSAR_RESPONSE_STATUS_FAILURE),
Review Comment:
The outer assertion is `noneSatisfy`, so the fewer conditions we put on
these histogram points, the fewer false positives we can expect.
--
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]