Skip to content

Commit

Permalink
test: fix flaky inspector-stop-profile-after-done
Browse files Browse the repository at this point in the history
Use common.platformTimeout() to give longer durations to Raspberry Pi
devices to make test more reliable.

PR-URL: nodejs#18126
Fixes: nodejs#16772
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Eugene Ostroukhov <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Trott committed Mar 2, 2018
1 parent c111e13 commit 81d73fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion test/sequential/sequential.status
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
13 changes: 7 additions & 6 deletions test/sequential/test-inspector-stop-profile-after-done.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 81d73fe

Please sign in to comment.