From 0cfc832a0e9ce05cede757b8467a7489f410b11e Mon Sep 17 00:00:00 2001 From: Alcahest Date: Sat, 12 Sep 2026 11:14:11 +0200 Subject: [PATCH] test: a five second wait is tight under four workers --- e2e/README.md | 17 ++++++++++++----- e2e/specs/current-line-bands.spec.js | 4 ++-- e2e/specs/dividers.spec.js | 2 +- e2e/specs/grid-columns.spec.js | 4 ++-- e2e/specs/interface-scale.spec.js | 6 +++--- e2e/specs/transport-after-open.spec.js | 2 +- e2e/specs/waveform-sash.spec.js | 4 ++-- e2e/specs/waveform-zoom.spec.js | 4 ++-- 8 files changed, 25 insertions(+), 18 deletions(-) diff --git a/e2e/README.md b/e2e/README.md index 6309eac0..5742f298 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -411,11 +411,18 @@ Every `waitFor` in this suite takes a timeout, and every one of them is multipli This is not a way of making a red run green. What a check asserts does not change, and a check whose condition never becomes true still fails; it only takes longer to give up. What it buys is the -difference between the two machines. The whole battery runs one spec at a time and takes about -thirteen minutes on a workstation and fifteen to twenty-one on the two-core runner, and on -2026-09-07 three pull requests in a row went red there on waits that no rerun and no local run -reproduced: eight spec files on one, a single spec on the next, a different single spec on the third. -A timeout that is generous here is tight there. +difference between the two machines. On 2026-09-07 three pull requests in a row went red there on +waits that no rerun and no local run reproduced: eight spec files on one, a single spec on the next, +a different single spec on the third. A timeout that is generous here is tight there. + +**And since N24 it is tight here too.** The battery runs four workers, so four apps share the +machine and every one of them is slower than it was alone: the paragraph above used to say the +battery runs one spec at a time, which stopped being true. On 2026-09-12 five batteries in a row +each dropped one spec, a different one every time, all of them on five second waits. Those thirteen +waits are fifteen seconds now, raised at their own call sites the way the rule below says. Two were +left alone on purpose: `asr.spec.js` looks for a dialog that may not be there at all, so its five +seconds is a cost ceiling rather than a wait, and `video-empty.spec.js` is asking a surface to +**stay** unmapped rather than to become it. Two things follow from that. A wait that fails even at twice the timeout is worth reading as a real failure rather than as slowness, and a check that needs a longer wait than the suite gives it should diff --git a/e2e/specs/current-line-bands.spec.js b/e2e/specs/current-line-bands.spec.js index 5884ebc5..1d822e9e 100644 --- a/e2e/specs/current-line-bands.spec.js +++ b/e2e/specs/current-line-bands.spec.js @@ -618,13 +618,13 @@ async function pickSize(toplevel, percent) { const item = `.menubar__item--view-interface-scale-${percent}`; await clickElement(toplevel, ".menubar__title--view"); await waitFor(() => present(item), { - timeout: 5000, + timeout: 15000, message: `the View menu to offer ${percent} per cent`, }); await clickElement(toplevel, item); await waitFor( async () => (Math.abs((await interfaceScale()) - percent / 100) < 0.001 ? 1 : null), - { timeout: 5000, message: `the interface to be drawn at ${percent} per cent` }, + { timeout: 15000, message: `the interface to be drawn at ${percent} per cent` }, ); await browser.pause(250); } diff --git a/e2e/specs/dividers.spec.js b/e2e/specs/dividers.spec.js index abfd84b4..a9bf17ea 100644 --- a/e2e/specs/dividers.spec.js +++ b/e2e/specs/dividers.spec.js @@ -374,7 +374,7 @@ describe("the shell's three edges", () => { return Math.abs(now - before.video) > 100 ? now : null; }, { - timeout: 5000, + timeout: 15000, message: `the video panel to move more than 100px from ${Math.round(before.video)} while the button is still down`, }, ); diff --git a/e2e/specs/grid-columns.spec.js b/e2e/specs/grid-columns.spec.js index 8f8cb9e1..7b03c17c 100644 --- a/e2e/specs/grid-columns.spec.js +++ b/e2e/specs/grid-columns.spec.js @@ -424,14 +424,14 @@ async function pickSize(toplevel, percent) { const item = `.menubar__item--view-interface-scale-${percent}`; await clickElement(toplevel, ".menubar__title--view"); await waitFor(() => present(item), { - timeout: 5000, + timeout: 15000, message: `the View menu to offer ${percent} per cent`, }); await clickElement(toplevel, item); await waitFor( async () => (Math.abs((await interfaceScale()) - percent / 100) < 0.001 ? 1 : null), { - timeout: 5000, + timeout: 15000, message: `the interface to be drawn at ${percent} per cent`, }, ); diff --git a/e2e/specs/interface-scale.spec.js b/e2e/specs/interface-scale.spec.js index ae82b913..99ef63c4 100644 --- a/e2e/specs/interface-scale.spec.js +++ b/e2e/specs/interface-scale.spec.js @@ -338,13 +338,13 @@ async function pickSize(toplevel, percent) { const item = `.menubar__item--view-interface-scale-${percent}`; await clickElement(toplevel, ".menubar__title--view"); await waitFor(() => present(item), { - timeout: 5000, + timeout: 15000, message: `the View menu to offer ${percent} per cent`, }); await clickElement(toplevel, item); await waitFor( async () => (Math.abs((await interfaceScale()) - percent / 100) < 0.001 ? 1 : null), - { timeout: 5000, message: `the interface to be drawn at ${percent} per cent` }, + { timeout: 15000, message: `the interface to be drawn at ${percent} per cent` }, ); // Picking is also what stores the size, and the checks below relaunch the app: a pause here is // the same one `dragSash` takes, for the same write. @@ -737,7 +737,7 @@ describe("the interface size", () => { return now.video <= settled.video + SLOP_PX ? now : null; }, { - timeout: 5000, + timeout: 15000, message: `the video panel to follow the pointer from ${Math.round(wide.video)} down to ` + `${Math.round(settled.video)} while the button is still down`, diff --git a/e2e/specs/transport-after-open.spec.js b/e2e/specs/transport-after-open.spec.js index 0155c754..350a5460 100644 --- a/e2e/specs/transport-after-open.spec.js +++ b/e2e/specs/transport-after-open.spec.js @@ -80,7 +80,7 @@ async function clickTransport(toplevel) { /** What the button reads, waited for, with what it actually says when it never gets there. */ async function expectTransportToRead(wanted) { await waitFor(async () => ((await transportLabel()) === wanted ? true : null), { - timeout: 5000, + timeout: 15000, message: `the transport button to read ${JSON.stringify(wanted)}`, }).catch(async (error) => { const asked = await askedAt(); diff --git a/e2e/specs/waveform-sash.spec.js b/e2e/specs/waveform-sash.spec.js index 6771b886..95d3573a 100644 --- a/e2e/specs/waveform-sash.spec.js +++ b/e2e/specs/waveform-sash.spec.js @@ -257,7 +257,7 @@ describe("the waveform sash", () => { await clickElement(toplevel, ".menubar__title--view"); await clickElement(toplevel, ".menubar__item--view-waveform-panel"); await waitFor(async () => !(await present(".waveform")), { - timeout: 5000, + timeout: 15000, message: "the waveform panel to go", }); expect(`the sash went with it: ${await present(SASH)}`).toBe("the sash went with it: false"); @@ -268,7 +268,7 @@ describe("the waveform sash", () => { await clickElement(toplevel, ".menubar__title--view"); await clickElement(toplevel, ".menubar__item--view-waveform-panel"); await waitFor(() => present(".waveform"), { - timeout: 5000, + timeout: 15000, message: "the waveform panel to come back", }); expect(await heightOf(".currentline")).toBe(withPanel); diff --git a/e2e/specs/waveform-zoom.spec.js b/e2e/specs/waveform-zoom.spec.js index 1c824ebf..3afd7632 100644 --- a/e2e/specs/waveform-zoom.spec.js +++ b/e2e/specs/waveform-zoom.spec.js @@ -106,7 +106,7 @@ async function scaleAfter(press) { const before = await scale(); press(); await waitFor(async () => (await scale()) !== before, { - timeout: 5000, + timeout: 15000, message: `the scale to move from ${before}`, }); return scale(); @@ -205,7 +205,7 @@ describe("the waveform's zoom is in the registry", () => { pressKey("minus"); pressKey("0"); await waitFor(async () => (await valueOf(".currentline__text")) !== before, { - timeout: 5000, + timeout: 15000, message: "the three characters to arrive in the text box", }); expect(await valueOf(".currentline__text")).toBe(`${before}+-0`);