Skip to content

Commit

Permalink
test: make sure that inspector tests finish
Browse files Browse the repository at this point in the history
PR-URL: #32673
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
addaleax authored and targos committed Apr 11, 2020
1 parent f41660a commit 756a049
Show file tree
Hide file tree
Showing 28 changed files with 33 additions and 30 deletions.
2 changes: 1 addition & 1 deletion test/parallel/test-inspector-bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ async function doTests() {
await testNoCrashConsoleLogBeforeThrow();
}

doTests();
doTests().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/parallel/test-inspector-esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ async function runTest() {
assert.strictEqual((await child.expectShutdown()).exitCode, 55);
}

runTest();
runTest().then(common.mustCall());
4 changes: 2 additions & 2 deletions test/parallel/test-inspector-multisession-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async function test() {
}

const interval = setInterval(() => {}, 1000);
test().then(() => {
test().then(common.mustCall(() => {
clearInterval(interval);
console.log('Done!');
});
}));
2 changes: 1 addition & 1 deletion test/parallel/test-inspector-multisession-ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ async function runTest() {
return child.expectShutdown();
}

runTest();
runTest().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/parallel/test-inspector-reported-host.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ async function test() {
child.kill();
}

test();
test().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/parallel/test-inspector-tracing-domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ async function test() {
console.log('Success');
}

test();
test().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/parallel/test-inspector-wait-for-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ async function runTests() {
assert.throws(() => require('inspector').waitForDebugger(), re);
}

runTests();
runTests().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/parallel/test-inspector-waiting-for-disconnect.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ async function runTest() {
assert.strictEqual((await child.expectShutdown()).exitCode, 55);
}

runTest();
runTest().then(common.mustCall());
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ async function runTests() {
assert.strictEqual((await instance.expectShutdown()).exitCode, 55);
}

runTests();
runTests().then(common.mustCall());
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ async function runTests() {
instance.kill();
}

runTests();
runTests().then(common.mustCall());
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ function assertArrayIncludes(actual, expected) {
`Expected ${actualString} to contain ${expectedString}.`);
}

runTests();
runTests().then(common.mustCall());
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ async function runTests() {
instance.kill();
}

runTests();
runTests().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-break-e.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ async function runTests() {
assert.strictEqual((await instance.expectShutdown()).exitCode, 0);
}

runTests();
runTests().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-break-when-eval.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ async function runTests() {
assert.strictEqual((await child.expectShutdown()).exitCode, 0);
}

runTests();
runTests().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-console.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ async function runTest() {
session.disconnect();
}

runTest();
runTest().then(common.mustCall());
5 changes: 4 additions & 1 deletion test/sequential/test-inspector-contexts.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,7 @@ async function testBreakpointHit() {
await pausedPromise;
}

testContextCreatedAndDestroyed().then(common.mustCall(testBreakpointHit));
(async function() {
await testContextCreatedAndDestroyed();
await testBreakpointHit();
})().then(common.mustCall());
4 changes: 2 additions & 2 deletions test/sequential/test-inspector-debug-brk-flag.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async function testBreakpointOnStart(session) {
}

async function runTests() {
const child = new NodeInstance(['--inspect', '--debug-brk']);
const child = new NodeInstance(['--inspect', '--inspect-brk']);
const session = await child.connectInspectorSession();

await testBreakpointOnStart(session);
Expand All @@ -36,4 +36,4 @@ async function runTests() {
assert.strictEqual((await child.expectShutdown()).exitCode, 55);
}

runTests();
runTests().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-debug-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ async function runTest() {
await testSessionNoCrash();
}

runTest();
runTest().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ async function runTest() {
assert.strictEqual((await child.expectShutdown()).exitCode, 1);
}

runTest();
runTest().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-ip-detection.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ async function test() {
instance.kill();
}

test();
test().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-not-blocked-on-idle.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ async function runTests() {
node.kill();
}

runTests();
runTests().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-overwrite-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ async function runTests() {
assert.ok(asserted, 'log statement did not reach the inspector');
}

runTests();
runTests().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-resource-name-to-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ common.skipIfInspectorDisabled();
const { params: { url } } = await promise;
strictEqual(url, expected);
}
})();
})().then(common.mustCall());
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ common.skipIfInspectorDisabled();
}
);
session.disconnect();
})();
})().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-scriptparsed-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ async function runTests() {
assert.strictEqual((await instance.expectShutdown()).exitCode, 0);
}

runTests();
runTests().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-stop-profile-after-done.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ async function runTests() {
assert.strictEqual((await child.expectShutdown()).exitCode, 0);
}

runTests();
runTests().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-stress-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ async function runTest() {
return child.kill();
}

runTest();
runTest().then(common.mustCall());
2 changes: 1 addition & 1 deletion test/sequential/test-inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,4 +314,4 @@ async function runTest() {
);
}

runTest();
runTest().then(common.mustCall());

0 comments on commit 756a049

Please sign in to comment.