summaryrefslogtreecommitdiff
path: root/test/parallel/test-inspector-connect-main-thread.js
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-09-17 13:50:04 +0200
committerRich Trott <rtrott@gmail.com>2019-09-17 11:11:55 -0700
commit3adec437917005650ea9e77fdf1460ee1d2f4a89 (patch)
tree8abe30116620b955f147a771139dca8fd8359bea /test/parallel/test-inspector-connect-main-thread.js
parent49cf67efd66a94a93f4c91be6c39125e7f896ee7 (diff)
downloadandroid-node-v8-3adec437917005650ea9e77fdf1460ee1d2f4a89.tar.gz
android-node-v8-3adec437917005650ea9e77fdf1460ee1d2f4a89.tar.bz2
android-node-v8-3adec437917005650ea9e77fdf1460ee1d2f4a89.zip
test: fix flaky test-inspector-connect-main-thread
Using `console.log()` likely interferes with the functionality of the test, which also checks the interaction between inspector and `console.log()` as part of the test. Using `process._rawDebug()` solves that issue. Refs: https://github.com/nodejs/node/pull/28870 Refs: https://github.com/nodejs/node/pull/29582 PR-URL: https://github.com/nodejs/node/pull/29588 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'test/parallel/test-inspector-connect-main-thread.js')
-rw-r--r--test/parallel/test-inspector-connect-main-thread.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-inspector-connect-main-thread.js b/test/parallel/test-inspector-connect-main-thread.js
index 0b072ecf59..7f354fb76f 100644
--- a/test/parallel/test-inspector-connect-main-thread.js
+++ b/test/parallel/test-inspector-connect-main-thread.js
@@ -27,10 +27,10 @@ async function post(session, method, params) {
session.post(method, params, (error, success) => {
messagesSent.push(method);
if (error) {
- console.log(`Message ${method} produced an error`);
+ process._rawDebug(`Message ${method} produced an error`);
reject(error);
} else {
- console.log(`Message ${method} was sent`);
+ process._rawDebug(`Message ${method} was sent`);
resolve(success);
}
});