testcontainers / testcontainers/testcontainers-python

Bug: [minio] _healthcheck calls for nested wait_container_is_ready resulting in long wait time

Open Beginner friendly
#578 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.3k
Forks
386
Avg merge
4h 40m
Merged PRs (30d)
1

Description

Describe the bug

MinioContainer._healthcheck is decorated with wait_container_is_ready and calls get_exposed_port which is also decorated wait_container_is_ready. This results in a default wait time of 120*120=14400 seconds...

As a workaround I set the testcontainers_config.max_tries manually:

import pytest
from testcontainers.core.config import testcontainers_config

@pytest.fixture(scope="session", autouse=True)
def config_testcontatiners():
    testcontainers_config.max_tries = 10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in modules/minio/testcontainers/minio/init.py at MinioContainer._healthcheck and inspect how its wait_container_is_ready decoration interacts with get_exposed_port. Confirm the readiness flow and ensure the health check no longer causes nested waits that multiply the default timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.