-
Notifications
You must be signed in to change notification settings - Fork 38
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
Comments
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:
|
I have the same problem with Testcontainer databases. They run forever. |
If you are using the Docker provider, the Testcontainers library should take care of cleaning up the database containers itself. It uses a helper Ryuk container for this purpose. Please make sure you haven't disabled this functionality - https://java.testcontainers.org/features/configuration/#disabling-ryuk |
It seems to be a local problem for me. In my case (MacBook M4 with Podman), the Ryuk-container behaves correcty, but the Postgres-Containers not. In my team, I'm the only one with that problem. I would then just decline my PR here. :) |
The problem might be caused by using Podman. Testcontainers should support it, but I've never tried it myself. So I'm not sure if the library is fully compatible. If you figure out what's causing the issue and it's something I can fix, let me know. |
A colleague has also a MacBook (M1) with Podman. And for him, it works correctly. Funny thing. |
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
The text was updated successfully, but these errors were encountered: