Skip to content

Commit f5119a1

Browse files
Merge pull request #855 from jiridanek/jd_rstudio_render_pdf
RHOAIENG-17257: chore(tests): make the wait for readiness optional
2 parents 3d7b42d + 4a1520f commit f5119a1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/containers/workbenches/workbench_image_test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import functools
24
import http.cookiejar
35
import logging
@@ -92,12 +94,13 @@ def _connect(self) -> None:
9294
finally:
9395
result.close()
9496

95-
def start(self):
97+
def start(self, wait_for_readiness: bool = True) -> WorkbenchContainer:
9698
super().start()
9799
container_id = self.get_wrapped_container().id
98100
docker_client = testcontainers.core.container.DockerClient().client
99101
logging.debug(docker_client.api.inspect_container(container_id)['HostConfig'])
100-
self._connect()
102+
if wait_for_readiness:
103+
self._connect()
101104
return self
102105

103106

0 commit comments

Comments
 (0)