From 62a5e4f0161f7dfa01d49f1157656fcb57b87612 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 9 Jan 2023 12:39:09 +0100 Subject: [PATCH] test: convert test-debugger-pid to async/await https://github.com/nodejs/node/pull/45179 --- ...unt_for_debugger_agent_race_condition.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/patches/node/fix_account_for_debugger_agent_race_condition.patch b/patches/node/fix_account_for_debugger_agent_race_condition.patch index b5e644ed688a6..0ee1ae3fbced0 100644 --- a/patches/node/fix_account_for_debugger_agent_race_condition.patch +++ b/patches/node/fix_account_for_debugger_agent_race_condition.patch @@ -22,14 +22,14 @@ index eab99c9b0e2fb387ef9a716396e41c7fc93e93bc..f33e85415e3a8d5df073acbf03aed527 await cli.command('sb("alive.js", 3)'); await cli.waitFor(/break/); diff --git a/test/sequential/test-debugger-pid.js b/test/sequential/test-debugger-pid.js -index 0056113ecaecd3a176ee9539b7fda0132ef59963..3228d0ecc220b5c8c8034fea0dce20f8c38ac68c 100644 +index 99062149dfe3374b86439850e0655383e2bad662..97c93741b2426740e12eaf9e7786ae6ded4782b7 100644 --- a/test/sequential/test-debugger-pid.js +++ b/test/sequential/test-debugger-pid.js -@@ -41,6 +41,7 @@ function launchTarget(...args) { - .then(() => cli.command('sb("alive.js", 3)')) - .then(() => cli.waitFor(/break/)) - .then(() => cli.waitForPrompt()) -+ .then(() => new Promise(resolve => setTimeout(resolve, 1000))) - .then(() => { - assert.match( - cli.output, +@@ -20,6 +20,7 @@ const runTest = async () => { + await cli.command('sb("alive.js", 3)'); + await cli.waitFor(/break/); + await cli.waitForPrompt(); ++ await new Promise(resolve => setTimeout(resolve, 1000)) + assert.match( + cli.output, + /> 3 {3}\+\+x;/,