From 6d3c5b78c843335c822041aa07487078fc13e61f Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 28 Dec 2016 09:08:07 +0100 Subject: src: reduce test_inspector_socket_server output Currently, when test/cctest/test_inspector_socket_server.cc is run there is output written to stderr by src/inspector_socket_server.cc which is interleaved with the gtest report: Debugger listening on port 9229. Warning: This is an experimental feature and could change at any time. To start debugging, open the following URLs in Chrome: ... The goal of this commit is to remove the above logged information by introducing an out_ member in the InspectorSocketServer class which defaults to stderr (keeping the current behavior). Setting out_ to NULL is supported in which case nothing will be written and is what the test has been configured with. When working on specific test case the appropriate output stream can be specified for the ServerHolder constructor to limit logging to that test case. PR-URL: https://github.com/nodejs/node/pull/10537 Reviewed-By: James M Snell Reviewed-By: Eugene Ostroukhov Reviewed-By: Colin Ihrig --- test/cctest/test_inspector_socket_server.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/cctest/test_inspector_socket_server.cc') diff --git a/test/cctest/test_inspector_socket_server.cc b/test/cctest/test_inspector_socket_server.cc index 136bf796ae..3c19661f97 100644 --- a/test/cctest/test_inspector_socket_server.cc +++ b/test/cctest/test_inspector_socket_server.cc @@ -300,9 +300,9 @@ class SocketWrapper { class ServerHolder { public: template - ServerHolder(Delegate* delegate, int port) + ServerHolder(Delegate* delegate, int port, FILE* out = NULL) : closed(false), paused(false), sessions_terminated(false), - server_(delegate, port) { + server_(delegate, port, out) { delegate->Connect(&server_); } -- cgit v1.2.3