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

EngineStateMonitor#TIMER instance not created with daemon thread #915

Open
ibragfir opened this issue Sep 29, 2023 · 1 comment
Open

EngineStateMonitor#TIMER instance not created with daemon thread #915

ibragfir opened this issue Sep 29, 2023 · 1 comment
Labels
good first issue Good for newcomers kind/bug Categorizes issue or PR as related to a bug. severity/mid Marks a bug as having a noticeable impact but with a known workaround

Comments

@ibragfir
Copy link

Description

As part of our build, we're starting our spring-boot app (which starts InMemoryEngine), running all of our tests and then stopping the app with spring-boot-maven-plugin. However, our doesn't gracefully finish due to a WAITING non-daemon thread.
image
Analyzing the code, we've identified that it's the EngineStateMonitor#TIMER instance is created with default Timer() constructor which starts the TimerThread as non-daemon.
We do shutdown the engine ZeebeTestEngine#stop and a client ZeebeClient#close.

Expected behaviour

TIMER instance needs to be created with a daemon thread TIMER = new Timer(true) so that the app shuts down gracefully.
Or make sure stopping the test engine also stops the TIMER instance and frees up the resources.

@ibragfir ibragfir added the kind/bug Categorizes issue or PR as related to a bug. label Sep 29, 2023
@remcowesterhoud
Copy link
Contributor

Thanks for raising and analyzing @ibragfir! I agree it makes sense to run the Timer as a daemon. Would you mind creating a PR for this?

@remcowesterhoud remcowesterhoud added good first issue Good for newcomers severity/mid Marks a bug as having a noticeable impact but with a known workaround labels Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/bug Categorizes issue or PR as related to a bug. severity/mid Marks a bug as having a noticeable impact but with a known workaround
Projects
None yet
Development

No branches or pull requests

2 participants