Skip to content

Commit 777df50

Browse files
committed
add version back in
Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>
1 parent 55d7520 commit 777df50

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

prometheus-metrics-core/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
<dependency>
5555
<groupId>org.awaitility</groupId>
5656
<artifactId>awaitility</artifactId>
57+
<version>4.3.0</version>
5758
<scope>test</scope>
5859
</dependency>
5960
</dependencies>

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,16 +1103,15 @@ && getExemplar(s, 4.0, "path", "/hello") != null
11031103
.until(
11041104
() -> {
11051105
Exemplar actual = getExemplar(histogram.collect(), 4.0, "path", "/hello");
1106-
return actual != null && Math.abs(actual.getValue() - 3.4) < 0.0001;
1106+
return actual != null && Math.abs(actual.getValue() - 3.4) < 0.00001;
11071107
});
11081108
snapshot = histogram.collect();
11091109
// custom exemplars have preference, so the automatic exemplar is replaced
11101110
assertExemplarEquals(custom, getExemplar(snapshot, 4.0, "path", "/hello"));
11111111
}
11121112

11131113
/**
1114-
* Waits for the exemplar sampler's rate limit window so the next observation is accepted. Uses a
1115-
* deterministic delay (2x sample interval) so the scheduler is ready.
1114+
* Waits for the exemplar sampler's rate limit window so the next observation is accepted.
11161115
*/
11171116
private static void waitForSampleInterval(long sampleIntervalMillis) {
11181117
try {

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
public class TestUtil {
1010

1111
public static void assertExemplarEquals(Exemplar expected, Exemplar actual) {
12-
assertThat(actual)
13-
.as("Expected exemplar to be present (rate-limited sampler may not have accepted yet)")
14-
.isNotNull();
1512
// ignore timestamp
1613
assertThat(actual.getValue()).isCloseTo(expected.getValue(), offset(0.00001));
1714
assertThat((Iterable<? extends Label>) actual.getLabels()).isEqualTo(expected.getLabels());

0 commit comments

Comments
 (0)