From cc90bbd0f416b2d716df3a41b92da3854cba53ee Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 2 Mar 2018 12:10:55 -0800 Subject: [PATCH] test: fix flaky inspector-stop-profile-after-done Use common.platformTimeout() to give longer durations to Raspberry Pi devices to make test more reliable. PR-URL: https://github.com/nodejs/node/pull/18126 Fixes: https://github.com/nodejs/node/issues/16772 Reviewed-By: Anatoli Papirovski Reviewed-By: Ruben Bridgewater Reviewed-By: Eugene Ostroukhov Reviewed-By: Richard Lau Reviewed-By: James M Snell --- test/sequential/sequential.status | 1 - .../test-inspector-stop-profile-after-done.js | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/sequential/sequential.status b/test/sequential/sequential.status index 5c0b460154f84f..b95db2a111ea67 100644 --- a/test/sequential/sequential.status +++ b/test/sequential/sequential.status @@ -13,7 +13,6 @@ test-inspector-debug-end : PASS, FLAKY test-inspector-async-hook-setup-at-signal: PASS, FLAKY test-http2-ping-flood : PASS, FLAKY test-http2-settings-flood : PASS, FLAKY -test-inspector-stop-profile-after-done: PASS, FLAKY [$system==linux] diff --git a/test/sequential/test-inspector-stop-profile-after-done.js b/test/sequential/test-inspector-stop-profile-after-done.js index 7069e490255ce5..15764d84860e8c 100644 --- a/test/sequential/test-inspector-stop-profile-after-done.js +++ b/test/sequential/test-inspector-stop-profile-after-done.js @@ -12,17 +12,18 @@ async function runTests() { console.log(new Object()); if (c++ === 10) clearInterval(interval); - }, 10);`); + }, ${common.platformTimeout(30)});`); const session = await child.connectInspectorSession(); session.send([ - { 'method': 'Profiler.setSamplingInterval', 'params': { 'interval': 100 } }, - { 'method': 'Profiler.enable' }, - { 'method': 'Runtime.runIfWaitingForDebugger' }, - { 'method': 'Profiler.start' }]); + { method: 'Profiler.setSamplingInterval', + params: { interval: common.platformTimeout(300) } }, + { method: 'Profiler.enable' }, + { method: 'Runtime.runIfWaitingForDebugger' }, + { method: 'Profiler.start' }]); while (await child.nextStderrString() !== 'Waiting for the debugger to disconnect...'); - await session.send({ 'method': 'Profiler.stop' }); + await session.send({ method: 'Profiler.stop' }); session.disconnect(); assert.strictEqual(0, (await child.expectShutdown()).exitCode); }