Skip to content

fix(minio): Use wait strategy instead of deprecated decorator#899

Merged
alexanderankin merged 1 commit into
testcontainers:mainfrom
solute:minio-wait-strategy
Dec 5, 2025
Merged

fix(minio): Use wait strategy instead of deprecated decorator#899
alexanderankin merged 1 commit into
testcontainers:mainfrom
solute:minio-wait-strategy

Conversation

@mschmitzer

Copy link
Copy Markdown
Contributor

Part of fixing #874.

@codecov

codecov Bot commented Oct 9, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.78%. Comparing base (5c1504c) to head (3903509).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #899   +/-   ##
=======================================
  Coverage   79.78%   79.78%           
=======================================
  Files          14       14           
  Lines        1182     1182           
  Branches      184      184           
=======================================
  Hits          943      943           
  Misses        197      197           
  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.
@mschmitzer mschmitzer force-pushed the minio-wait-strategy branch from 79bff0f to 3903509 Compare October 9, 2025 10:37
@artem-ilin

Copy link
Copy Markdown
Contributor

@mschmitzer I see this PR is good to go. And I saw you've already done a commit for redis container. Can you please create a PR for that too?

@mschmitzer

Copy link
Copy Markdown
Contributor Author

@mschmitzer I see this PR is good to go. And I saw you've already done a commit for redis container. Can you please create a PR for that too?

Glad to hear that 👍
I held back on the Redis MR to see how this one goes first. Created it now: #914

@mschmitzer

Copy link
Copy Markdown
Contributor Author

@artem-ilin Can we proceed with this and #914 ?

@artem-ilin

artem-ilin commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

@mschmitzer hi! I'm not a maintainer, even not a contributor yet :)
But if the "merge" button is available for you - I believe you can press it and the same for the other PR.

On my side I am also waiting for a #915 to be approved (the same fix for Elasticsearch container)

UPD: to be honest I'm looking forward to your redis PR to be merged

@mschmitzer

Copy link
Copy Markdown
Contributor Author

Ah, I see. So I guess I should ping @alexanderankin 😄

@alexanderankin alexanderankin merged commit febccb7 into testcontainers:main Dec 5, 2025
15 checks passed
alexanderankin pushed a commit that referenced this pull request Jan 7, 2026
🤖 I have created a release *beep* *boop*
---


##
[4.14.0](testcontainers-v4.13.3...testcontainers-v4.14.0)
(2026-01-07)


### Features

* Add ExecWaitStrategy and migrate Postgres from deprecated decorator
([#935](#935))
([2d9eee3](2d9eee3))


### Bug Fixes

* add ruff to deps
([#919](#919))
([5853d32](5853d32))
* **cassandra,mysqk,kafka:** Use wait strategy instead of deprecated
wait_for_logs
([#945](#945))
([b7791b9](b7791b9))
* **core:** recreate poetry lockfile with latest versions of libraries
([#946](#946))
([9a97385](9a97385))
* **elasticsearch:** Use wait strategy instead of deprecated decorator
([#915](#915))
([c785ecd](c785ecd))
* **minio:** minio client requires kwargs now
([#933](#933))
([37f5902](37f5902))
* **minio:** Use wait strategy instead of deprecated decorator
([#899](#899))
([febccb7](febccb7))

---
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>
alexanderankin added a commit that referenced this pull request Apr 7, 2026
Another part of fixing #874 (cf. #899).

---------

Co-authored-by: Dave Ankin <alexanderankin@gmail.com>
alexanderankin added a commit that referenced this pull request Jun 3, 2026
…943)

# fix(mongodb): Use wait strategy instead of deprecated wait_for_logs

## Summary

Replace the deprecated `wait_for_logs` function with
`LogMessageWaitStrategy` in the MongoDB container module.

This is part of a fix for
#874 and
similar to:
- #899 (MinIO - merged)
- #915 (Elasticsearch - merged)
- #935 (Postgres - merged)
- #903 (Kafka/Redpanda - open)
- #914 (Redis - open)
- #941 (Redis - open)

## Changes

- Import `LogMessageWaitStrategy` instead of `wait_for_logs`
- Pass `_wait_strategy=LogMessageWaitStrategy(...)` to parent
constructor
- Override `_connect()` with empty implementation (DbContainer's base
implementation uses SQLAlchemy which doesn't apply to MongoDB)

## Testing

All existing MongoDB tests pass:
```
poetry run pytest modules/mongodb/tests/ -v
======================== 4 passed in 16.26s ========================
```

No deprecation warnings from testcontainers after this change.

Co-authored-by: David Ankin <daveankin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants