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

brand new Statehandler replaces "Boot" waitgroup we previously used for testing. #344

Merged
merged 5 commits into from
Jun 17, 2023

Conversation

simonmittag
Copy link
Owner

the StateHandler transitions from Bootstrap to Daemon to Shutdown.

Use the wait method to park your client behind a status. Wait has a variadic timeout parameter which is mainly for unit testing purposes.

…or testing.

the StateHandler transitions from Bootstrap to Daemon to Shutdown.

Use the wait method to park your client behind a status. Wait has a variadic timeout parameter which is mainly for unit testing purposes.
Added a whole suite of tests to check for state progression, including multiple calls to (nonblocking) setState
Changing loglevel after Bootstrap (and in Daemon mode) is done by Runtime.resetLogLevel and calls upon the new StateHandler in Runtime.
…h the ServerState "Bootstrap", which is a ServerState inside the mode "Server".

introduced global ShutDown() method which is the equivalent of Bootstrap during termination. it resets the loglevel to INFO (synchronously) and while still in Daemon mode, before switchin to Shutdown mode.

setState now logs setting of 'Shutdown' at fatal level not info.
@sonarcloud
Copy link

sonarcloud bot commented Jun 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@simonmittag simonmittag merged commit 7e28ddd into master Jun 17, 2023
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.

1 participant