-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LogMessageWaitStrategy does not work for compose based restarting containers #2881
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this. |
Would be good to grab some attention from devs |
Can confirm that this issue is affecting me as well. LogConsumers also have problems with restarting containers: the first container's logs are captured, but not subsequent containers. |
we also ran into that issue and created a setup to reproduce the issue: in our scenario we are restarting the docker compose container programatically to reproduce: you can see that restart of the docker compose container will fail then (https://github.com/abendt/TestContainersWaitStrategy/blob/main/src/main/kotlin/demo/Main.kt#L34) |
Also went into the same this bug :( in a multiple containers scenario (Started through a docker compose file)
|
Hello!
The case is following:
A starts quite quickly, B start takes ~40 seconds
While B is unavailable C keeps restarting
Timed out waiting for log output matching <log>
Timed out waiting for log output matching <log>
Actually I'm interested in waiting for both of the services B and C explicitly, but only C should be valid as well.
Tried all the possible regex stuff (
.*log.*
,.*log.*\\s
,.*log!\\s
,.*log.*\n.*
etc)From my impression it seems that log polling breaks for a restarting container.
The difference between B and C here is that when starting B does not encounter broken B->A interaction since A could easily be started for the time of starting B. Hence B does not get restarted 'on error'.
As I got from debugging
testcontainers-java/core/src/main/java/org/testcontainers/containers/output/WaitingConsumer.java
Line 85 in 816b8c3
becomes
null
when the container is going to start successfully, it's really strange. It contains lines from a stacktrace when the container is going to be restarted andnull
when it's runningAny ideas? Thanks.
p.s. of course I see the desired log of the C in my terminal using
docker logs C
The text was updated successfully, but these errors were encountered: