Skip to content

Conversation

@jaydeluca
Copy link
Collaborator

@jaydeluca jaydeluca commented Feb 2, 2026

I've been encountering issues with io.prometheus.metrics.core.metrics.HistogramTest.testExemplarsClassicHistogram when running tests locally, lot's of these:

[ERROR] Tests run: 28, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.279 s <<< FAILURE! -- in io.prometheus.metrics.core.metrics.HistogramTest
[ERROR] io.prometheus.metrics.core.metrics.HistogramTest.testExemplarsClassicHistogram -- Time elapsed: 0.055 s <<< ERROR!
java.lang.NullPointerException: Cannot invoke "io.prometheus.metrics.model.snapshots.Exemplar.getValue()" because "actual" is null
        at io.prometheus.metrics.core.metrics.TestUtil.assertExemplarEquals(TestUtil.java:13)
        at io.prometheus.metrics.core.metrics.HistogramTest.testExemplarsClassicHistogram(HistogramTest.java:1054)

attempting to make it a little more reliable with awaitility.

Alternatively we could refactor the ExemplarSampler to take a clock as an argument so we could mock it, but I figured we could start here before we change the production code

Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>
@jaydeluca jaydeluca force-pushed the flaky-test branch 2 times, most recently from 3c85324 to 777df50 Compare February 2, 2026 17:09
Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>
@jaydeluca jaydeluca marked this pull request as ready for review February 2, 2026 17:21
@jaydeluca jaydeluca requested a review from zeitlinger February 2, 2026 17:21
Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants