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 <apapirovski@mac.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • 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.