Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
schlosna committed Sep 7, 2024
1 parent 63d3bd5 commit 9f4405b
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9f4405b

Please sign in to comment.