Skip to content

Commit 0430478

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

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,17 +1103,14 @@ && 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

1113-
/**
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.
1116-
*/
1113+
/** Waits for the exemplar sampler's rate limit window so the next observation is accepted. */
11171114
private static void waitForSampleInterval(long sampleIntervalMillis) {
11181115
try {
11191116
Thread.sleep(2 * sampleIntervalMillis);

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)