CI: tolerate runner mtime lag and stream heartbeat race in 2 browser tests (test-only, no production code change; playwright: 0.05s sleep after write_control, runner mtime lags wall clock 0.2-1.0ms; stream: drain waiting heartbeats until EOF after terminal status)
ci / test (push) Failing after 16m9s

This commit is contained in:
muse committed 2026-11-04 17:11:23 +01:00
1 parent a2c539999e
commit c1cb3f3d82
2 files changed
+19 -1

No files matched your search

+13 -1
View File
@@ -214,7 +214,19 @@ class BrowserProxyTestCase(unittest.TestCase):
db.commit()
finally:
db.close()
line = resp.readline().decode("utf-8")
# Terminal status ends the stream, but a waiting
# heartbeat may fire first on a loaded runner; drain
# waiting frames until EOF instead of requiring the
# first line after the update to be EOF.
for _ in range(20):
line = resp.readline().decode("utf-8")
if line == "":
break
if line.strip() == "":
continue
payload = json.loads(line[6:]) if line.startswith("data: ") else {}
if not payload.get("waiting"):
break
self.assertEqual(line, "")
finally:
conn.close()