Repository navigation
fix: Replace a test container whose database does not become reachable, and remove every container that failed to start. - #4
Merged
Conversation
…e, and remove every container that failed to start. Docker Desktop sometimes does not make the port it maps a container to reachable from the host. The container keeps running, but the database in it can never be reached, so start() failed after waiting 10 seconds, and left the container behind. This made tests fail now and then. start() now replaces such a container with a new one, up to three times, and then gives up with an exception that says why. Every other failure, e.g. an image that does not exist, is thrown at once, as it is. Either way, the container that failed to start is removed. This is what the Go SDK does since its #188. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hc2MPSLu7HDHTm8HiBsrDz
Keeps both the starter field and the documented constructor from #2, and describes in the Javadoc of start() that it replaces a container whose database does not become reachable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hc2MPSLu7HDHTm8HiBsrDz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A local
make qafailed inverifiesTheHashOfAnEventWhoseDataTheServerEscapes, because its container did not start:Docker Desktop sometimes does not make the port it maps a container to reachable from the host. The container keeps running, but the database in it can never be reached.
start()then failed after 10 seconds, and left the container behind. The Go SDK fixed the same in #188.What changes:
start()replaces such a container with a new one, up to three times.start()throws anIllegalStateExceptionthat says so, with the last failure as its cause.startContainer.Tests:
make qais green, and coverage stays at 100 %.This will conflict with #2, which documents
Container, in a few lines around the constructor andstart(). Whichever merges second, I rebase.🤖 Generated with Claude Code
https://claude.ai/code/session_01Hc2MPSLu7HDHTm8HiBsrDz