From 78ee065a117dfa6f05874d90eac54569c201bf3a Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 17 Sep 2019 13:50:04 +0200 Subject: [PATCH] test: fix flaky test-inspector-connect-main-thread MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: David Carlier Reviewed-By: Michaƫl Zasso --- test/parallel/test-inspector-connect-main-thread.js | 4 ++-- 1 file 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 0b072ecf598c32..7f354fb76f9393 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); } });