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

POstgres service not getting killed for imporper shutdown of test case #105

Open
alexsander55 opened this issue Jun 24, 2020 · 1 comment
Labels
type: enhancement A general enhancement

Comments

@alexsander55
Copy link

Capture

While running the test case , when the springboot test is shutdown forcefully in windows , the postgres intance that started is not getting killed.

version of embedded-database-spring-test used is 1.5.4
Window machine

@tomix26
Copy link
Collaborator

tomix26 commented Jun 26, 2020

Thanks for the report. I'll try to look at it, but I'm afraid there's not much that can be done about it. Because a shutdown hook is already registered every time a new postgres process is started, and as you can see, that's not enough.

Javadoc describing the behavior of shutdown hooks:

In rare circumstances the virtual machine may abort, that is, stop running without shutting down cleanly. This occurs when the virtual machine is terminated externally, for example with the SIGKILL signal on Unix or the TerminateProcess call on Microsoft Windows. The virtual machine may also abort if a native method goes awry by, for example, corrupting internal data structures or attempting to access nonexistent memory. If the virtual machine aborts then no guarantee can be made about whether or not any shutdown hooks will be run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants