Skip to content

EngineStateMonitor#TIMER instance not created with daemon thread #915

@ibragfir

Description

@ibragfir

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerskind/bugCategorizes issue or PR as related to a bug.severity/midMarks a bug as having a noticeable impact but with a known workaround

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions