From 02d3709944b417db644450366ad692630830cafd Mon Sep 17 00:00:00 2001 From: Frederic Jung Date: Thu, 5 Nov 2026 11:22:53 +0100 Subject: [PATCH] GPU benchmark server test: listen on 127.0.0.1, where it connects On the CI runners localhost resolves to ::1 first, so the server listened there while the test connected to 127.0.0.1. --- tests/gpu-bench-server.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/gpu-bench-server.test.js b/tests/gpu-bench-server.test.js index 4187738..7767842 100644 --- a/tests/gpu-bench-server.test.js +++ b/tests/gpu-bench-server.test.js @@ -21,7 +21,7 @@ function req(port, { method = 'GET', p = '/', host, headers = {}, body } = {}) { test('the benchmark server answers only its own page', async (t) => { const port = 20000 + Math.floor(Math.random() * 20000), out = path.join(fs.mkdtempSync(path.join(os.tmpdir(), 'bench-')), 'out.md'); - const srv = spawn(process.execPath, [path.join(ROOT, 'scripts', 'gpu-bench.js'), '--port', String(port), '--out', out], { stdio: ['ignore', 'pipe', 'pipe'] }); + const srv = spawn(process.execPath, [path.join(ROOT, 'scripts', 'gpu-bench.js'), '--port', String(port), '--host', '127.0.0.1', '--out', out], { stdio: ['ignore', 'pipe', 'pipe'] }); let log = ''; srv.stdout.on('data', (c) => { log += c; }); srv.stderr.on('data', (c) => { log += c; }); t.after(() => srv.kill()); for (let i = 0; i < 100 && !/Ctrl\+C/.test(log); i++) await new Promise((r) => setTimeout(r, 100));