summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2018-03-02 12:10:55 -0800
committerMyles Borins <mylesborins@google.com>2018-08-17 15:22:42 -0400
commit7d0f02e48db33f67b08f85d844bf141dc9587096 (patch)
treed2b8e46e5872981dd6536304cdee3098e04e681d /test
parentcf833e4901430b99687abb9b50fcc1804564f8ab (diff)
downloadnode-new-7d0f02e48db33f67b08f85d844bf141dc9587096.tar.gz
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>
Diffstat (limited to 'test')
-rw-r--r--test/sequential/test-inspector-stop-profile-after-done.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/sequential/test-inspector-stop-profile-after-done.js b/test/sequential/test-inspector-stop-profile-after-done.js
index d0285df175..b488281b0c 100644
--- a/test/sequential/test-inspector-stop-profile-after-done.js
+++ b/test/sequential/test-inspector-stop-profile-after-done.js
@@ -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);
}