File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ def wait_for_logs(
106106 """
107107 if isinstance (predicate , str ):
108108 predicate = re .compile (predicate , re .MULTILINE ).search
109+ wrapped = container .get_wrapped_container ()
109110 start = time .time ()
110111 while True :
111112 duration = time .time () - start
@@ -121,6 +122,8 @@ def wait_for_logs(
121122 return duration
122123 if duration > timeout :
123124 raise TimeoutError (f"Container did not emit logs satisfying predicate in { timeout :.3f} " "seconds" )
124- if raise_on_exit and container .get_wrapped_container ().status not in _NOT_EXITED_STATUSES :
125- raise RuntimeError ("Container exited before emitting logs satisfying predicate" )
125+ if raise_on_exit :
126+ wrapped .reload ()
127+ if wrapped .status not in _NOT_EXITED_STATUSES :
128+ raise RuntimeError ("Container exited before emitting logs satisfying predicate" )
126129 time .sleep (interval )
You can’t perform that action at this time.
0 commit comments