File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
modules/sftp/testcontainers/sftp Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 2020from cryptography .hazmat .primitives .asymmetric import rsa
2121
2222from testcontainers .core .container import DockerContainer
23- from testcontainers .core .waiting_utils import wait_for_logs
23+ from testcontainers .core .wait_strategies import LogMessageWaitStrategy
2424
2525if TYPE_CHECKING :
2626 from typing_extensions import Self
@@ -265,8 +265,9 @@ def _configure(self) -> None:
265265 self .with_exposed_ports (self .port )
266266
267267 def start (self ) -> Self :
268+ strategy = LogMessageWaitStrategy (f".*Server listening on 0.0.0.0 port { self .port } .*" )
269+ self .waiting_for (strategy )
268270 super ().start ()
269- wait_for_logs (self , f".*Server listening on 0.0.0.0 port { self .port } .*" )
270271 return self
271272
272273 def get_exposed_sftp_port (self ) -> int :
You can’t perform that action at this time.
0 commit comments