Skip to content

Commit 55d7520

Browse files
jaydelucaCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>
1 parent db6cd4f commit 55d7520

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

prometheus-metrics-core/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
<dependency>
5555
<groupId>org.awaitility</groupId>
5656
<artifactId>awaitility</artifactId>
57-
<version>4.3.0</version>
5857
<scope>test</scope>
5958
</dependency>
6059
</dependencies>

prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/HistogramTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,10 +1029,11 @@ public void markCurrentSpanAsExemplar() {}
10291029
await()
10301030
.atMost(2, SECONDS)
10311031
.until(
1032-
() ->
1033-
getExemplar(histogram.collect(), Double.POSITIVE_INFINITY, "path", "/hello") != null
1034-
&& getExemplar(histogram.collect(), Double.POSITIVE_INFINITY, "path", "/world")
1035-
!= null);
1032+
() -> {
1033+
HistogramSnapshot s = histogram.collect();
1034+
return getExemplar(s, Double.POSITIVE_INFINITY, "path", "/hello") != null
1035+
&& getExemplar(s, Double.POSITIVE_INFINITY, "path", "/world") != null;
1036+
});
10361037
snapshot = histogram.collect();
10371038
assertExemplarEquals(ex1a, getExemplar(snapshot, 1.0, "path", "/hello"));
10381039
assertExemplarEquals(ex1b, getExemplar(snapshot, 1.0, "path", "/world"));

0 commit comments

Comments
 (0)