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
It is safe NOT to call gnomock.Stop()
?
#1024
Comments
Hi @your-diary, thanks for the question and sorry for taking so long to respond. First, it is safe to not call Second, you should trust the code above the comments 😼 I might have missed some documentation changes when adding the cleaner container at some point, including changing the word most in one place, and adding information about automatic clean up in another place. Would you like to help me out and update the docs so everything becomes clear? You are correct, there is a bit of a mess. |
According to the documentation of
Start()
,But it isn't clear what will happen when you don't explicitly call
gnomock.Stop()
.As far as I tested, even if I don't explicitly call
gnomock.Stop()
, a container is terminated after a test. Is this behavior guaranteed?During a test,
docker ps
shows a container for DB and unknowngnomock-cleaner
. What is this? Is there any documentation for this?Edit: I just found
Start()
internally callsStartCustom()
(source) and the documentation ofStartCustom()
says (emphasis mine):This contradicts with the documentation of
Start()
above. Which should I trust?Edit2: While reading the source code, I found this:
Is this related?
The text was updated successfully, but these errors were encountered: