Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix flaky inspector-stop-profile-after-done #18126

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7e6ce28
wip: fix flaky inspector-stop-profile-after-done
Trott Jan 12, 2018
6eb2a64
wip: throw rather than timeout on infinite loop
Trott Feb 13, 2018
fa0be69
assert-o-rama
Trott Feb 16, 2018
7f6e390
reduce test to basically nothing
Trott Feb 16, 2018
7435ae2
wip: add session
Trott Feb 17, 2018
beb87c3
wip: add an await
Trott Feb 17, 2018
f934fb1
add another await
Trott Feb 19, 2018
b2c0fb2
a third await
Trott Feb 19, 2018
9838d7f
wip: send four command
Trott Feb 19, 2018
20a565c
wip: reduce messages to 1
Trott Feb 20, 2018
99f7d51
wip: 2 sends
Trott Feb 21, 2018
02fcc81
wip: 3 sends
Trott Feb 21, 2018
4c6c788
wip: is it better if we await the whole debugger-attach thing?
Trott Feb 21, 2018
4d3f4c8
all four sends
Trott Feb 21, 2018
c57df84
wip: 3 sends but still waiting for debugger disconnect message
Trott Feb 22, 2018
be6a7f1
try moving Profiler.start
Trott Feb 23, 2018
053d19e
see if moving Profiler.start after program exits still has flaky resu…
Trott Feb 24, 2018
63ad338
add an await
Trott Feb 25, 2018
aff6d01
no reason to think this will go any better but why not?
Trott Feb 25, 2018
37748aa
try writing to the process to let it know when to end
Trott Feb 28, 2018
9b9abc6
remove profiler to see if that fixes it
Trott Feb 28, 2018
7143464
try longer times
Trott Feb 28, 2018
818e16f
doubling all the times: makes it worse or better or neither?
Trott Feb 28, 2018
ecd18cf
increase times some more as it seems to enhance stability
Trott Mar 1, 2018
e259d26
increase timeouts
Trott Mar 2, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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