Describe the bug
The testcontainers.core.waiting_utils.wait_for_logs keeps waiting despite the container has exited. This can be confusing if there is a long wait time.
To Reproduce
from testcontainers.core import container, waiting_utils
if __name__ == "__main__":
waiting_utils.wait_for_logs(
container.DockerContainer("flyway/flyway").start(),
r"Successfully applied \d+ migrations to schema",
timeout=large_n, #
)
# >> Raised Exception has occurred: TimeoutError Container did not emit logs satisfying predicate in `large_n` seconds
Runtime environment
Python: 3.11.9
testcontainers 4.7.2
Implementation: CPython