Skip to content

Commit bb6443b

Browse files
adulbrichclaude
andcommitted
fix(e2e): give the desktop run room on a Windows runner
Ubuntu passed the whole spec in 2m33s. Windows was still merging when the 180-second wait expired, having got as far as "Filtering images: kept 13 of 18" and stopped there. Nothing was wrong: the WebAssembly build is single-threaded on purpose and a GitHub Windows runner is two slow cores. Raised to ten minutes, and mocha's own timeout past that so a slow run fails with the app's last reported state rather than mocha killing the test first and reporting only that time ran out. Also stopped the state report crying wolf. It flagged any `role="dialog"` as blocking the run, but the progress modal is one -- so it announced "BLOCKED-BY-DIALOG" on every healthy run, which is worse than saying nothing, because the one time it matters nobody believes it. It now looks for a dialog that actually offers a decision. Worth recording that the diagnostic earned its keep on its first CI run: the failure named the last four pipeline steps and their timestamps, so "stalled after filtering" was legible from the log without reproducing anything. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent a65645c commit bb6443b

2 files changed

Lines changed: 22 additions & 5 deletions

File tree

e2e-tests/test/specs/app.e2e.ts

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,11 @@ async function waitForOutputs(outputDir: string): Promise<void> {
248248
.length >= 2
249249
);
250250
},
251-
{ interval: 1000, timeout: 180_000, timeoutMsg: "no outputs" }
251+
// Ten minutes. The WebAssembly build is single-threaded on purpose and a
252+
// GitHub Windows runner is two slow cores: Ubuntu finished the whole
253+
// spec in 2m33s while Windows was still merging at the old 180s cap.
254+
// This is a hang detector, not a performance budget.
255+
{ interval: 1000, timeout: 600_000, timeoutMsg: "no outputs" }
252256
);
253257
} catch (error) {
254258
throw new Error(
@@ -275,9 +279,19 @@ async function readPipelineState(): Promise<string> {
275279
)
276280
.slice(-8)
277281
.join(" || ");
278-
const dialog = document.querySelector('[role="dialog"]');
279-
const blocking = dialog
280-
? ` BLOCKED-BY-DIALOG:${(dialog.textContent ?? "").slice(0, 120)}`
282+
// Only a dialog offering a decision is blocking. The progress modal is a
283+
// `role="dialog"` too, so reporting every dialog cried wolf on every
284+
// healthy run -- which is worse than saying nothing, because the one time
285+
// it matters nobody believes it.
286+
const waiting = Array.from(
287+
document.querySelectorAll('[role="dialog"]')
288+
).find((dialog) =>
289+
Array.from(dialog.querySelectorAll("button")).some((button) =>
290+
/generate (anyway|all)|go back/i.test(button.textContent ?? "")
291+
)
292+
);
293+
const blocking = waiting
294+
? ` WAITING-ON-DIALOG:${(waiting.textContent ?? "").slice(0, 120)}`
281295
: "";
282296
return `tauri=${tauri} workers=${workers} shown=${shown || "(nothing)"}${blocking}`;
283297
});

e2e-tests/wdio.conf.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ export const config = {
5454
framework: "mocha",
5555
maxInstances: 1,
5656
mochaOpts: {
57-
timeout: 240_000,
57+
// Comfortably longer than the pipeline's own wait, so a slow run fails
58+
// with "no outputs, the app was showing ..." rather than mocha killing the
59+
// test first and reporting only that time ran out.
60+
timeout: 900_000,
5861
ui: "bdd",
5962
},
6063

0 commit comments

Comments
 (0)