openvibers/openvibe.media Commits

finish-f2: Changed: the server-boot wait in test/perf-budget.test.js…

OP OpenVibers committed 1 Oct 2026 · 3fde10c2e4 · 2 files, +4 −3

Handed to the local harness by the cloud job pr-OpenVibe.Media-4; done by Claude opus.

Changes

ddiff --git a/test/perf-budget.test.js b/test/perf-budget.test.js
iindex 4456166..c364024 100644
---- a/test/perf-budget.test.js
++++ b/test/perf-budget.test.js
@@@ -40,7 +40,7 @@ const { measure, check, format } = require('openvibe-shared/perf-budget');
const base = `http://127.0.0.1:${port}`;
try {
let up = false;
-- for (let i = 0; i < 150 && !up; i++) {
++ for (let i = 0; i < 600 && !up; i++) { // 60 s: a cold PGlite boot plus migrations is slow on a loaded machine
up = await fetch(`${base}/healthz`).then((r) => r.ok).catch(() => false);
if (!up) await new Promise((r) => setTimeout(r, 100));
}
ddiff --git a/test/trust-proxy.test.js b/test/trust-proxy.test.js
iindex e6460b4..48618b2 100644
---- a/test/trust-proxy.test.js
++++ b/test/trust-proxy.test.js
@@@ -65,8 +65,9 @@ const express = require('express');
child.stdout.on('data', (d) => { log += d; });
child.stderr.on('data', (d) => { log += d; });
let up = false;
-- for (let i = 0; i < 100 && !up; i++) {
-- try { up = (await get('127.0.0.1', freePort, '/healthz')).status === 200; } catch { await new Promise((res) => setTimeout(res, 100)); }
++ for (let i = 0; i < 600 && !up; i++) { // 60 s: a cold PGlite boot plus migrations is slow on a loaded machine
++ try { up = (await get('127.0.0.1', freePort, '/healthz')).status === 200; } catch { /* not listening yet */ }
++ if (!up) await new Promise((res) => setTimeout(res, 100));
}
assert.ok(up, `the server booted: ${log.slice(-500)}`);
// /metrics answers loopback callers only and refuses anything that came through a proxy; with