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: #18126
Fixes: #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 authored and MylesBorins committed Aug 17, 2018
1 parent cf833e4 commit 7d0f02e
Showing 1 changed file with 7 additions and 6 deletions.
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 @@ -11,17 +11,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 7d0f02e

Please sign in to comment.