From 2e861692467fdaf818a6b03525af69e6d45d2fab Mon Sep 17 00:00:00 2001 From: sideshowbarker Date: Mon, 22 Jun 2026 15:57:37 +0900 Subject: [PATCH] Tests: Serialize Worker-echo messages to eliminate an ordering race MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: The Worker-echo.html test flakes under load in CI on the Sanitizer runners, printing its messages out of order. Cause: The test asserts a fixed order for messages arriving over two separate ports: “loaded” over the Worker’s own port, and the channel messages over the transferred MessagePort. Those two race, with no cross-port ordering guarantee. So the printed order is nondeterministic. Fix: Sequence each message explicitly with an awaited helper — the same approach used for SharedWorker-reuse in #9669 — so the printed order is deterministic. port2 is left unstarted until after “loaded”. --- .../LibWeb/Text/input/Worker/Worker-echo.html | 49 +++++++++---------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/Tests/LibWeb/Text/input/Worker/Worker-echo.html b/Tests/LibWeb/Text/input/Worker/Worker-echo.html index f2f263914c..f62ec5c09b 100644 --- a/Tests/LibWeb/Text/input/Worker/Worker-echo.html +++ b/Tests/LibWeb/Text/input/Worker/Worker-echo.html @@ -1,33 +1,30 @@