Skip to content

Commit 7d0f02e

Browse files
TrottMylesBorins
authored andcommitted
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: #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]>
1 parent cf833e4 commit 7d0f02e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/sequential/test-inspector-stop-profile-after-done.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@ async function runTests() {
1111
console.log(new Object());
1212
if (c++ === 10)
1313
clearInterval(interval);
14-
}, 10);`);
14+
}, ${common.platformTimeout(30)});`);
1515
const session = await child.connectInspectorSession();
1616

1717
session.send([
18-
{ 'method': 'Profiler.setSamplingInterval', 'params': { 'interval': 100 } },
19-
{ 'method': 'Profiler.enable' },
20-
{ 'method': 'Runtime.runIfWaitingForDebugger' },
21-
{ 'method': 'Profiler.start' }]);
18+
{ method: 'Profiler.setSamplingInterval',
19+
params: { interval: common.platformTimeout(300) } },
20+
{ method: 'Profiler.enable' },
21+
{ method: 'Runtime.runIfWaitingForDebugger' },
22+
{ method: 'Profiler.start' }]);
2223
while (await child.nextStderrString() !==
2324
'Waiting for the debugger to disconnect...');
24-
await session.send({ 'method': 'Profiler.stop' });
25+
await session.send({ method: 'Profiler.stop' });
2526
session.disconnect();
2627
assert.strictEqual(0, (await child.expectShutdown()).exitCode);
2728
}

0 commit comments

Comments
 (0)