-
Notifications
You must be signed in to change notification settings - Fork 43
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
Is isRunning method works fine? #81
Comments
This will be unit test for this fix:
|
Could you upload following changes:
|
Thanks for reporting @wojciechszymski , and apologies for the long delay. This is potentially related to #82 . We believe that this should be fixed in the meantime - a new version |
Hi! We just wanted to follow up on our last message to see whether your issue has been resolved. Were you able to get it working with the latest version of LocalStack? We would appreciate your feedback! |
I try to make a simple e2e test (Java + Spring Framework) which check our API by stopping Localstack instance, sending message to broker instance and finally asserting HTTP error response code. This test is part of bigger test suite with DirtiesContext annotation (with after each method mode).
Out Localstack bean is customized. In Spring Configuration we defined a bean with custom init and destroy methods. Init method will be posted below, destroy method just send purge requests into all queues. We don't want to stop Localstack instance - time optimization.
Init method:
After
localstack.stop();
- our init method will never work becauseisRunning
method returns alwaystrue
even when docker doesn't have running containers (docker ps
return empty list).If Localstack object (unfortunately a static object) has non-null instance of
localStackContainer
-isRunning
method returntrue
response (with empty list of available ports underneath). Seems likestop
method do not unsetlocalStackContainer
field?Container.isRunning method:
Could you allow to unset
localStackContainer
field or just unset this instance innerstop
method? We just want to find out (usingisRunning
method) that docker image is running or not to avoid unnecessary Localstack restart between single test (using DirtiesContext annotation).The text was updated successfully, but these errors were encountered: