Commit aae38e45df2 for nodejs
commit aae38e45df27481240e611b370865ccc9d4c5786
Author: Filip Skokan <panva.ip@gmail.com>
Date: Sat Sep 26 11:19:12 2026 +0200
test: deflake inspector close connection test
Wait for NodeRuntime.waitingForDebugger before sending the resume
command. Runtime.executionContextCreated does not guarantee that the
child has started waiting for the debugger.
Refs: https://github.com/nodejs/node/actions/runs/36224832165/job/108356717128
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66320
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
diff --git a/test/parallel/test-inspector-close-terminate-connections.js b/test/parallel/test-inspector-close-terminate-connections.js
index ab18ad277db..e055044506b 100644
--- a/test/parallel/test-inspector-close-terminate-connections.js
+++ b/test/parallel/test-inspector-close-terminate-connections.js
@@ -18,9 +18,9 @@ async function test() {
const instance = new NodeInstance(['--inspect-brk=0'], script);
const session = await instance.connectInspectorSession();
- // Enable Runtime domain and wait for an event to confirm the session is live.
- await session.send({ method: 'Runtime.enable' });
- await session.waitForNotification('Runtime.executionContextCreated');
+ // Wait until the child is ready to receive the resume command.
+ await session.send({ method: 'NodeRuntime.enable' });
+ await session.waitForNotification('NodeRuntime.waitingForDebugger');
// Resume execution so the script calls inspector.close().
await session.send({ method: 'Runtime.runIfWaitingForDebugger' });