You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above code will raise "RuntimeError: Container exited before emitting logs satisfying predicate". This is not true, though, because the container does not exit. Checking container.get_wrapped_container().status as wait_for_logs does shows "created". This triggers the raise in wait_for_logs because that only accepts "running".
The second problem is visible here, too, because container.get_wrapped_container().status stays "created" even when the container is running. The wait_for_logs function would have to call reload on the wrapped container to actually see it change state and see when it does exit.
Runtime environment
Provide a summary of your runtime environment. Which operating system, python version, and docker version are you using? What is the version of testcontainers-python you are using? You can run the following commands to get the relevant information.
Describe the bug
The
raise_on_exit
feature ofwait_for_logs
does not work as expected because itTo Reproduce
The above code will raise "RuntimeError: Container exited before emitting logs satisfying predicate". This is not true, though, because the container does not exit. Checking
container.get_wrapped_container().status
aswait_for_logs
does shows "created". This triggers theraise
inwait_for_logs
because that only accepts "running".The second problem is visible here, too, because
container.get_wrapped_container().status
stays "created" even when the container is running. Thewait_for_logs
function would have to callreload
on the wrapped container to actually see it change state and see when it does exit.Runtime environment
Provide a summary of your runtime environment. Which operating system, python version, and docker version are you using? What is the version of
testcontainers-python
you are using? You can run the following commands to get the relevant information.The text was updated successfully, but these errors were encountered: