From 78803a962e772ab55e80c31963f6179d8d8e7394 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Date: Sat, 3 Oct 2026 10:55:04 +0200 Subject: [PATCH] (test): pin the own pid in the procstart batch tests The tests write descriptors for pids 1000..1066 and init() defaults ownPid to process.pid, so a runner whose test process lands in that range had one candidate excluded as its own: 2 !== 3 and 66 !== 67 on Windows CI. Closes #426 --- test/cli-session-procstart-batch.test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/cli-session-procstart-batch.test.js b/test/cli-session-procstart-batch.test.js index 8573a77f..03d1b12c 100644 --- a/test/cli-session-procstart-batch.test.js +++ b/test/cli-session-procstart-batch.test.js @@ -39,6 +39,7 @@ function boot(dir, readProcStartMany, platform) { readProcStartMany, platform, readParentPid: () => null, + ownPid: -1, }); } @@ -106,6 +107,7 @@ test('no probe is spawned when no candidate needs one', () => withDir(async (dir cliSessionState.init({ dir, activeSessions: new Map(), log: silentLog, onIdle: () => {}, isProcessAlive: (pid) => pid === 4242, + ownPid: -1, readProcStartMany: async () => { calls++; return new Map(); }, }); const found = await cliSessionState.liveElsewhereMany(['sess-4242', 'sess-4343'], noPty);