Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ThreadStateSamplerTest flicker #196

Merged
merged 1 commit into from
Jan 26, 2021
Merged

Fix ThreadStateSamplerTest flicker #196

merged 1 commit into from
Jan 26, 2021

Conversation

jasonjkeller
Copy link
Contributor

Hmm ThreadStateSamplerTest seems to flicker pretty badly. The test passes locally but seems to fail consistently when run on PRs. I’ve seen numerous failures on a PR that doesn’t even touch agent functionality.

com.newrelic.agent.threads.ThreadStateSamplerTest > testCpuTimeMetrics FAILED
    java.lang.AssertionError at ThreadStateSamplerTest.java:57

The assertion looks to be:

        assertTrue("TotalTime: " + totalTimeSeconds + ", SystemTime: " + systemTimeSeconds + ", UserTime: " + userTimeSeconds,
                totalTimeSeconds + 0.2 >= systemTimeSeconds + userTimeSeconds); // account for rounding error

@jasonjkeller jasonjkeller merged commit 5c9f82a into main Jan 26, 2021
@jasonjkeller jasonjkeller deleted the fix-test-flicker branch January 26, 2021 17:03
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