diff --git a/tests/playwright/conftest.py b/tests/playwright/conftest.py index f51d25dc6..237261898 100644 --- a/tests/playwright/conftest.py +++ b/tests/playwright/conftest.py @@ -136,6 +136,7 @@ def __init__(self, proc: subprocess.Popen[str], port: int): self.proc = proc self.port = port self.url = f"http://127.0.0.1:{port}/" + print(f"App url is {self.url}") self.stdout = OutputStream(proc.stdout or dummyio()) self.stderr = OutputStream(proc.stderr or dummyio()) threading.Thread(group=None, target=self._run, daemon=True).start() @@ -187,6 +188,7 @@ def run_shiny_app( timeout_secs: float = 10, bufsize: int = 64 * 1024, ) -> ShinyAppProc: + if port == 0: port = shiny._utils.random_port() diff --git a/tests/playwright/shiny/session/flush/test_on_flush.py b/tests/playwright/shiny/session/flush/test_on_flush.py index eadb2c76f..f5dc1409a 100644 --- a/tests/playwright/shiny/session/flush/test_on_flush.py +++ b/tests/playwright/shiny/session/flush/test_on_flush.py @@ -29,6 +29,7 @@ def test_output_image_kitchen(page: Page, local_app: ShinyAppProc) -> None: # Wait up to 3 seconds for the app to close and print the logs. (Should be ~ instant) local_app.stdout.wait_for(lambda x: "test4" in x, 10) stdout = str(local_app.stdout) + print(local_app.stderr) print(f"stdout: `{stdout}`") print(local_app.stdout) out_indexes = [