From 9f4405b4c18ab3f2853ae5b1ad304d12a91a645f Mon Sep 17 00:00:00 2001 From: David Schlosnagle Date: Sat, 7 Sep 2024 08:16:16 -0400 Subject: [PATCH] update tests --- .../AutobatcherTelemetryComponentsTest.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/atlasdb-autobatch/src/test/java/com/palantir/atlasdb/autobatch/AutobatcherTelemetryComponentsTest.java b/atlasdb-autobatch/src/test/java/com/palantir/atlasdb/autobatch/AutobatcherTelemetryComponentsTest.java index 13002f7d716..384395a9a97 100644 --- a/atlasdb-autobatch/src/test/java/com/palantir/atlasdb/autobatch/AutobatcherTelemetryComponentsTest.java +++ b/atlasdb-autobatch/src/test/java/com/palantir/atlasdb/autobatch/AutobatcherTelemetryComponentsTest.java @@ -116,19 +116,25 @@ private void assertTotalTimeMetricsAreReported(TaggedMetricRegistry registry, Lo } private void assertWaitTimeMetricsAreNotReported(TaggedMetricRegistry registry) { - assertThat(getWaitTimeHistogram(registry)).isNull(); + assertThat(getWaitTimeHistogram(registry)).isNotNull().satisfies(histogram -> assertThat(histogram.getCount()) + .isZero()); } private void assertRunningTimeMetricsAreNotReported(TaggedMetricRegistry registry) { - assertThat(getRunningTimeHistogram(registry)).isNull(); + assertThat(getRunningTimeHistogram(registry)) + .isNotNull() + .satisfies(histogram -> assertThat(histogram.getCount()).isZero()); } private void assertWaitTimePercentageMetricsAreNotReported(TaggedMetricRegistry registry) { - assertThat(getWaitTimePercentageHistogram(registry)).isNull(); + assertThat(getWaitTimePercentageHistogram(registry)) + .isNotNull() + .satisfies(histogram -> assertThat(histogram.getCount()).isZero()); } private void assertTotalTimeMetricsAreNotReported(TaggedMetricRegistry registry) { - assertThat(getTotalTimeHistogram(registry)).isNull(); + assertThat(getTotalTimeHistogram(registry)).isNotNull().satisfies(histogram -> assertThat(histogram.getCount()) + .isZero()); } private static Histogram getWaitTimeHistogram(TaggedMetricRegistry registry) {