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

Address intermittent test failures #2517

Merged
merged 7 commits into from
Nov 11, 2020
Merged

Address intermittent test failures #2517

merged 7 commits into from
Nov 11, 2020

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented Nov 10, 2020

The tests which exercise synthetic @SimplyTimed annotation handling when beans are vetoed show intermittent failures.

The problem turned out to be in the tests. The base registry (where, by spec, the synthetic SimpleTimer metrics go) could be populated with synthetic SimpleTimers by earlier tests. Then, when the veto tests would run, and the MetricsCdiExtension code would correctly ignore vetoed beans and not add the synthetic metrics to the registry again, but the registry entries were already present from earlier tests run in the same JVM. The tests, finding those entries, would report a failure.

The difference between the tests passing locally and failing in the pipeline was due to differences in the order in which surefire ran the tests.

I've added a @BeforeAll that clears out the REST.request SimpleTimers to remove stale registrations, so the tests of the veto support find no synthetic SimpleTimers from previous tests.

@tjquinno tjquinno self-assigned this Nov 10, 2020
@tjquinno tjquinno marked this pull request as draft November 10, 2020 20:55
@tjquinno tjquinno marked this pull request as ready for review November 10, 2020 21:32
@tjquinno
Copy link
Member Author

The previous change resulted in clean builds. I've triggered them again manually to check again.

Signed-off-by: tim.quinn@oracle.com <tim.quinn@oracle.com>
Signed-off-by: tim.quinn@oracle.com <tim.quinn@oracle.com>
Signed-off-by: tim.quinn@oracle.com <tim.quinn@oracle.com>
@tjquinno tjquinno merged commit fd25678 into helidon-io:master Nov 11, 2020
@tjquinno tjquinno deleted the veto-handling branch November 11, 2020 20:24
@tjquinno tjquinno added this to the 2.1.1 milestone Nov 11, 2020
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.

None yet

2 participants