integration tests hang waiting for Postgres container in GitHub Actions
testcontainers-python 3.7, GitHub Actions ubuntu-latest. My integration test starts a Postgres container and waits for it with wait_for_logs. Locally it takes two seconds. In CI it hangs for 60 seconds then dies with TimeoutError: Container did not log 'database system is ready'. Docker is available — other steps in the workflow use it fine. What am I missing here?
Traceback (most recent call last):
File "tests/test_integration.py", line 18, in test_db
container.wait_for_logs("database system is ready")
File "testcontainers/core/container.py", line 512, in wait_for_logs
raise TimeoutError(msg)
TimeoutError: Container did not log 'database system is ready' within 60s
4 replies