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

Suppress warning when metrics PeriodicExecutor is stopped multiple times (e.g., during tests) #3617

Merged
merged 2 commits into from
Nov 4, 2021
Merged

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented Nov 4, 2021

Resolves #3616

Change warning message to fine when PeriodicExecutor is shut down multiple times. This can happen if multiple @HelidonTests run in the same JVM.

This should not happen normally in production servers...the PeriodicExecutor stop is triggered when MetricsSupport receives notification of server shutdown, and there is typically at most one MetricsSupport instance in a server.

Also, while I was here, I changed synchronized methods to use a Semaphore instead.

@tjquinno tjquinno self-assigned this Nov 4, 2021
@tjquinno tjquinno merged commit 25378b6 into helidon-io:master Nov 4, 2021
@tjquinno tjquinno deleted the periodic-multiple branch November 4, 2021 19:29
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.

Metrics PeriodicExecutor logs warning when there are multiple @HelidonTest tests
2 participants