fix(generic): Also catch URLError waiting for ServerContainer#743
Merged
alexanderankin merged 1 commit intotestcontainers:mainfrom Nov 26, 2024
Conversation
There was a race condition here because the server hasn't always started before we send a request to it. This was causing a lot of unnecessary test failures.
alexanderankin
pushed a commit
that referenced
this pull request
Dec 10, 2024
🤖 I have created a release *beep* *boop* --- ## [4.9.0](testcontainers-v4.8.2...testcontainers-v4.9.0) (2024-11-26) ### Features * **compose:** support for setting profiles ([#738](#738)) ([3e00e71](3e00e71)) * **core:** Support working with env files ([#737](#737)) ([932ee30](932ee30)) ### Bug Fixes * allow running all tests ([#721](#721)) ([f958cf9](f958cf9)) * **core:** Avoid hanging upon bad docker host connection ([#742](#742)) ([4ced198](4ced198)) * **core:** running testcontainer inside container ([#714](#714)) ([85a6666](85a6666)) * **generic:** Also catch URLError waiting for ServerContainer ([#743](#743)) ([24e354f](24e354f)) * update wait_for_logs to not throw on 'created', and an optimization ([#719](#719)) ([271ca9a](271ca9a)) * Vault health check ([#734](#734)) ([79434d6](79434d6)) ### Documentation * Documentation fix for ServerContainer ([#671](#671)) ([0303d47](0303d47)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Problem summary
There was a race condition here because the server hasn't always started before we send a request to it. This was causing a lot of unnecessary test failures.
This change makes use of
ServerContainermuch more reliable.Example Traceback