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: https://github.com/nodejs/node/pull/18126 Fixes: https://github.com/nodejs/node/issues/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>
This commit is contained in:
parent
c111e133ae
commit
81d73fe83e
@ -13,7 +13,6 @@ test-inspector-debug-end : PASS, FLAKY
|
|||||||
test-inspector-async-hook-setup-at-signal: PASS, FLAKY
|
test-inspector-async-hook-setup-at-signal: PASS, FLAKY
|
||||||
test-http2-ping-flood : PASS, FLAKY
|
test-http2-ping-flood : PASS, FLAKY
|
||||||
test-http2-settings-flood : PASS, FLAKY
|
test-http2-settings-flood : PASS, FLAKY
|
||||||
test-inspector-stop-profile-after-done: PASS, FLAKY
|
|
||||||
|
|
||||||
[$system==linux]
|
[$system==linux]
|
||||||
|
|
||||||
|
@ -12,17 +12,18 @@ async function runTests() {
|
|||||||
console.log(new Object());
|
console.log(new Object());
|
||||||
if (c++ === 10)
|
if (c++ === 10)
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
}, 10);`);
|
}, ${common.platformTimeout(30)});`);
|
||||||
const session = await child.connectInspectorSession();
|
const session = await child.connectInspectorSession();
|
||||||
|
|
||||||
session.send([
|
session.send([
|
||||||
{ 'method': 'Profiler.setSamplingInterval', 'params': { 'interval': 100 } },
|
{ method: 'Profiler.setSamplingInterval',
|
||||||
{ 'method': 'Profiler.enable' },
|
params: { interval: common.platformTimeout(300) } },
|
||||||
{ 'method': 'Runtime.runIfWaitingForDebugger' },
|
{ method: 'Profiler.enable' },
|
||||||
{ 'method': 'Profiler.start' }]);
|
{ method: 'Runtime.runIfWaitingForDebugger' },
|
||||||
|
{ method: 'Profiler.start' }]);
|
||||||
while (await child.nextStderrString() !==
|
while (await child.nextStderrString() !==
|
||||||
'Waiting for the debugger to disconnect...');
|
'Waiting for the debugger to disconnect...');
|
||||||
await session.send({ 'method': 'Profiler.stop' });
|
await session.send({ method: 'Profiler.stop' });
|
||||||
session.disconnect();
|
session.disconnect();
|
||||||
assert.strictEqual(0, (await child.expectShutdown()).exitCode);
|
assert.strictEqual(0, (await child.expectShutdown()).exitCode);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user