Skip to content

fix(core): wait for ryuk more reliably, improve tests: long_running, filter logs - #984

Merged
alexanderankin merged 4 commits into
mainfrom
fix/improve_core_testing
Mar 18, 2026
Merged

fix(core): wait for ryuk more reliably, improve tests: long_running, filter logs#984
alexanderankin merged 4 commits into
mainfrom
fix/improve_core_testing

Conversation

@Tranquility2

@Tranquility2Tranquility2 commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

This was originally only to fix#983 but I took the time to fix some other stuff that made reading and running the tests less optimal.

  • Fix test_ryuk flakiness: replace fixed sleep with polling helper (_wait_for_container_removed) that waits for Ryuk to finish reaping
  • Suppress expected error logs in test_compose_volumes and test_wait_strategies to reduce test noise
  • Add test = False to TestcontainersConfiguration to prevent pytest from trying to collect it as a test class
  • Add long_running pytest marker to pyproject.toml
  • Mark DinD/DooD tests as long_running since they build Docker images and take x4 than all the other tests combined
  • Add quick-core-tests Makefile target to run core tests excluding long_running tests for faster feedback loops

@Tranquility2Tranquility2 changed the title Improve test reliabilityFix: Improve test reliabilityMar 16, 2026
@Tranquility2Tranquility2 changed the title Fix: Improve test reliabilityfix: Improve test reliabilityMar 16, 2026
@Tranquility2

Tranquility2 commented Mar 16, 2026

Copy link
Copy Markdown
ContributorAuthor

Looks like there is an issue with cassandra-driver (v3.29.3) in python 3.14
This blocks:

  1. linting
  2. test with python 3.14

@codecov

codecovBot commented Mar 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.96%. Comparing base (44dd40b) to head (cb66305).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #984 +/- ##
==========================================
+ Coverage 78.94% 78.96% +0.01% 
==========================================
Files 14 14 Lines 1216 1217 +1 Branches 142 142 ==========================================
+ Hits 960 961 +1 
Misses 214 214 Partials 42 42 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment threadcore/tests/test_ryuk.py Outdated
@Tranquility2Tranquility2 changed the title fix: Improve test reliabilitycore: Improve test reliabilityMar 16, 2026
@Tranquility2Tranquility2 changed the title core: Improve test reliabilityfix: Improve test reliabilityMar 16, 2026
@Tranquility2

Copy link
Copy Markdown
ContributorAuthor

@alexanderankin mind taking a look?

@alexanderankinalexanderankin changed the title fix: Improve test reliabilityfix(core): wait for ryuk more reliably, long_runningMar 18, 2026
@alexanderankinalexanderankin changed the title fix(core): wait for ryuk more reliably, long_runningfix(core): wait for ryuk more reliably, improve tests: long_running, filter logsMar 18, 2026
@alexanderankin
alexanderankin merged commit b12ae13 into mainMar 18, 2026
7 checks passed
@alexanderankin
alexanderankin deleted the fix/improve_core_testing branch March 18, 2026 05:27
alexanderankin added a commit that referenced this pull request Apr 7, 2026
🤖 I have created a release *beep* *boop*
---
##
[4.15.0-rc.1](testcontainers-v4.14.2...testcontainers-v4.15.0-rc.1)
(2026-04-07)
### Features
* **compose:** add structured container inspect information
([#897](#897))
([58459a1](58459a1))
* **core:** support SSH-based DOCKER_HOST
([#993](#993))
([d48115d](d48115d))
* **generic:** Reintroducing the generic SQL module
([#892](#892))
([2ca2321](2ca2321))
* **keycloak:** support for relative path and management relative path
([#982](#982))
([898faf6](898faf6))
* **mqtt:** MosquittoContainer: Add version 2.1.2
([#978](#978))
([af382f7](af382f7))
### Bug Fixes
* **azurite:** make visible to type checkers
([#927](#927))
([baa5668](baa5668))
* **clickhouse:** add `HttpWaitStrategy` instead of deprecated
`wait_container_is_ready`
([#962](#962))
([8034541](8034541))
* **compose:** return type in get_service_port docstring
([#939](#939))
([fed65fe](fed65fe))
* **core:** Refactor copy file
([#996](#996))
([0e0bb24](0e0bb24))
* **core:** wait for ryuk more reliably, improve tests: long_running,
filter logs
([#984](#984))
([b12ae13](b12ae13))
* **generic:** Migrate ServerContainer from deprecated decorator to
HttpWaitStrategy
([#971](#971))
([460b0d8](460b0d8))
* **kafka:** Use wait strategy instead of deprecated wait_for_logs
([#903](#903))
([87332c1](87332c1))
* **postgres:** add py.typed marker to postgres module
([#849](#849))
([c8a5bbd](c8a5bbd))
* **qdrant:** migrate Qdrant from deprecated decorator.
([#963](#963))
([407f798](407f798))
* **redis:** Use wait strategy instead of deprecated decorator
([#914](#914))
([e25713a](e25713a))
* **sftp:** Avoid using wait_for_logs in module.
([#995](#995))
([83157eb](83157eb))
---
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>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with testing ryuk under dind

2 participants

@Tranquility2@alexanderankin