Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Reduce flakyness of testExemplarsClassicHistogram#1842

Merged
zeitlinger merged 4 commits intomainprometheus/client_java:mainfrom
flaky-testprometheus/client_java:flaky-testCopy head branch name to clipboard
Feb 4, 2026
Merged

Reduce flakyness of testExemplarsClassicHistogram#1842
zeitlinger merged 4 commits intomainprometheus/client_java:mainfrom
flaky-testprometheus/client_java:flaky-testCopy head branch name to clipboard

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
prometheus-metrics-core/pom.xml Outdated Show resolved Hide resolved
Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>
@zeitlinger zeitlinger merged commit baf8b76 into main Feb 4, 2026
43 checks passed
@zeitlinger zeitlinger deleted the flaky-test branch February 4, 2026 12:19
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.

2 participants

Comments

Close sidebar
Morty Proxy This is a proxified and sanitized view of the page, visit original site.