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 addaleax committed Mar 5, 2018
1 parent 77154cd commit cc90bbd
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 cc90bbd

Please sign in to comment.