Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

chore: fix flakey test

Myles Scolnick464d4a1e83f5
diff --git a/tests/_messaging/test_console_output_worker.py b/tests/_messaging/test_console_output_worker.py
index 225ede44d4..d52aeb9615 100644
--- a/tests/_messaging/test_console_output_worker.py
+++ b/tests/_messaging/test_console_output_worker.py
@@ -174,6 +174,11 @@ class TestConsoleOutputWorker:
# Use a longer timeout to ensure the message is processed
time.sleep(TIMEOUT_S * 5)
+ for _ in range(10):
+ time.sleep(0.1)
+ if len(stream.messages) == 1:
+ break
+
# Check that the message was written to the stream
assert len(stream.messages) == 1
assert stream.messages[0][1]["console"]["data"] == "Hello"