fix(core): add container logs to TimeoutError when wait strategy times out#1007
Merged
Conversation
alexanderankin
approved these changes
May 18, 2026
Member
|
not sure why the cicd is not running 👀 |
Member
|
core/testcontainers/core/container.py:223: error: "TimeoutError" has no |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1007 +/- ##
==========================================
+ Coverage 83.01% 83.06% +0.04%
==========================================
Files 16 16
Lines 1725 1730 +5
Branches 189 190 +1
==========================================
+ Hits 1432 1437 +5
Misses 236 236
Partials 57 57 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
alexanderankin
added a commit
that referenced
this pull request
Jun 3, 2026
🤖 I have created a release *beep* *boop* --- ## [4.15.0-rc3](testcontainers-v4.15.0-rc2...testcontainers-v4.15.0-rc3) (2026-06-03) ### Features * **core:** add Podman compatibility ([#1028](#1028)) ([37093ab](37093ab)) * **core:** auto-detect DOCKER_HOST from current docker context ([#1026](#1026)) ([d4b8ff6](d4b8ff6)), closes [#1025](#1025) ### Bug Fixes * **core:** add container logs to TimeoutError when wait strategy times out ([#1007](#1007)) ([1fadb40](1fadb40)) * **core:** close Reaper socket at interpreter exit to prevent ResourceWarning ([#1017](#1017)) ([d3a1517](d3a1517)) * **cosmosdb:** replace distutils.strtobool removed in Python 3.12 ([#1018](#1018)) ([3e487f4](3e487f4)) * **mongodb:** Use wait strategy instead of deprecated wait_for_logs ([#943](#943)) ([c8118e7](c8118e7)) * **mssql:** use `ExecWaitStrategy` instead of deprecated `wait_container_is_ready` ([#1016](#1016)) ([4c53b89](4c53b89)), closes [#874](#874) * **neo4j:** Swap out use of depricated wait utils for wait_strategies ([#1012](#1012)) ([6deaf3b](6deaf3b)) --- 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: David Ankin <daveankin@gmail.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.
Hello,
Thanks for testcontainers !
I had a lot of trouble to understand why my docker strategy was timing out and I ended up patching the code like in this PR to get the container logs when there is a timeout.
I hope it can help others when debugging.
make testsruns okHappy to update the PR if needed