openvibers/openvibe.design Commits

changes-chrome: 300 ms settle and a Chrome-file budget (#287)

OP OpenVibers committed 1 days ago · 86cb57ea99 · 2 files, +9 −1

The file makes 24 real page loads (12 pages at 390 and 1280) and the harness's default 600 ms quiet window after each load was most of its cost: 300 ms settles the same local pages and saves about 7 s. It now runs in ~26 s here instead of ~50 s on the cold CI runner that timed it out once (Design #282).

test/run.js gets 90 s, the budget Live's runner gives its Chrome tests, so a slow runner has headroom; the other files still finish in seconds.

Changes

ddiff --git a/test/changes-chrome.test.js b/test/changes-chrome.test.js
iindex e24f02d..a85266e 100644
---- a/test/changes-chrome.test.js
++++ b/test/changes-chrome.test.js
@@@ -16,6 +16,10 @@ const harness = require('openvibe-shared/browser-harness');
base: t.base,
routes,
widths: [390, 1280],
++ // The pages are local and settle in one round of requests: a 300 ms quiet window is enough after the
++ // last one, and the default 600 ms added 7 s to this file's 24 page loads (11-11: it ran at ~50 s
++ // against the runner's 60 s).
++ settleMs: 300,
checks: { status: true, errors: true, overflow: true, scripts: true, nojs: false, canonical: false, jsonld: false, axe: false, text: false, navigation: false },
ignoreErrors: [
// The shared Frame asks the live Network for the person's theme, the site record, the online strip
ddiff --git a/test/run.js b/test/run.js
iindex af3ae97..c60a132 100644
---- a/test/run.js
++++ b/test/run.js
@@@ -14,7 +14,11 @@
const { run } = require('openvibe-shared/test-runner');
// VERBOSE=1 also prints every file's output, then the summary again.
--run({ dir: __dirname, timeoutMs: 60_000, pad: 34, parallel: 1 }).then((r) => {
++// 90 s is the suite's budget for the Chrome file (test/changes-chrome.test.js, 24 real page loads): it takes ~26 s
++// here and needed ~50 s on a cold CI runner, where the 60 s limit timed it out once (11-11, Design #282). The other
++// files finish in seconds; only a stuck test waits this long. Live's runner declares 120 s for its Chrome tests the
++// same way.
++run({ dir: __dirname, timeoutMs: 90_000, pad: 34, parallel: 1 }).then((r) => {
if (process.env.VERBOSE) {
for (const t of r.results) console.log(`\n── ${t.file} ──\n${t.output.trimEnd()}`);
console.log(`\n${r.summary}`);