test: close release review gaps

This commit is contained in:
KoalaDev
2026-08-25 01:26:26 +02:00
parent e155973630
commit f84c3677ac
4 changed files with 9 additions and 5 deletions
+4 -1
View File
@@ -37,7 +37,10 @@ export async function startRelay(port) {
throw new Error(`relay exited with ${child.exitCode}: ${output.join('')}`);
}
try {
const response = await fetch(`http://127.0.0.1:${port}/health`);
const remainingMs = Math.max(1, deadline - Date.now());
const response = await fetch(`http://127.0.0.1:${port}/health`, {
signal: globalThis.AbortSignal.timeout(Math.min(1000, remainingMs))
});
if (response.ok) return { child, output };
} catch (_error) {
// Relay is still starting.
+3 -2
View File
@@ -51,9 +51,10 @@ async function connect(context, extensionId, { relayUrl, roomId, username }) {
test('@race synchronizes two packed clients across relay and service-worker restarts', async ({ context, extensionId, baseURL }) => {
test.setTimeout(120000);
const second = await launchExtensionContext();
const port = await reservePort();
let relay = await startRelay(port);
let relay = null;
try {
const port = await reservePort();
relay = await startRelay(port);
const firstUrl = `${baseURL}/pages/simple-player.html?client=first`;
const secondUrl = `${baseURL}/pages/simple-player.html?client=second`;
const firstPage = await context.newPage();