-
Notifications
You must be signed in to change notification settings - Fork 373
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
The Redis Server does not stop upon application crash. #84
Comments
This is a problem with my project's unit tests also. We have to manually kill the redis server process after every test failure. (v0.6 on Windows) |
Just add a shutdown hook.
|
@maksymkovalenko this does not seem to work... could you please add more detailed example? where should this be added? in constructor? |
So, there is a way this could perhaps be made to work. Instead of launching redis directly, embedded-redis could use a wrapper script to kill redis when the JVM terminates... i.e. a wrapper script that does something like: https://stackoverflow.com/a/4054436/1589700 On the other hand, outside of testing, there could be valid reasons for keeping the process alive... for example if one were using redis to store application state and restarting the JVM to live self-"update" the application, you might be really annoyed if the embedded redis dies with the JVM |
When the application crashes, the Redis server along with it does not stop. So if a test crashes, a person has to manually stop the process by killing it to free up the port.
The text was updated successfully, but these errors were encountered: