Skip to content

test: use log only in test-child-process-fork-net - #20873

Closed
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:improve-debugability
Closed

test: use log only in test-child-process-fork-net#20873
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:improve-debugability

Conversation

@Trott

Copy link
Copy Markdown
Member

We are currently having issues with test-child-process-fork-net on
Windows CI. Debugging is slightly hampered by the mix of console.log()
and console.error() as our test runner does not interleave stdout and
stderr, so the order of output is not preserved. Change the sole
instance of console.error() to console.log() to improve
debugability.

While editing, I also took the opportunity to add capitalization and
punctuation to comments (as that is a nit we see from time to time and
there is a potential ESLint rule to enforce the capitalization part).

Please 👍 this to fast-track. Thanks.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

We are currently having issues with test-child-process-fork-net on
Windows CI. Debugging is slightly hampered by the mix of `console.log()`
and `console.error()` as our test runner does not interleave stdout and
stderr, so the order of output is not preserved. Change the sole
instance of `console.error()` to `console.log()` to improve
debugability.
While editing, I also took the opportunity to add capitalization and
punctuation to comments (as that is a nit we see from time to time and
there is a potential ESLint rule to enforce the capitalization part).
@TrottTrott added the fast-track PRs that do not need to wait for 48 hours to land. label May 21, 2018
@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label May 21, 2018
@Trott

Copy link
Copy Markdown
MemberAuthor

@Trott

Copy link
Copy Markdown
MemberAuthor

@Trott

Copy link
Copy Markdown
MemberAuthor

@Trott

Copy link
Copy Markdown
MemberAuthor

@Trott

Copy link
Copy Markdown
MemberAuthor

Output for the failure on Windows now makes more sense:

not ok 52 parallel/test-child-process-fork-net --- duration_ms: 0.324 severity: fail exitcode: 1 stack: |- PARENT: server listening CHILD: server listening CLIENT: connected PARENT: got connection CLIENT: connected CHILD: got connection CLIENT: closed CHILD: got connection CHILD: got connection CLIENT: closed CLIENT: connected CLIENT: connected CLIENT: closed CLIENT: closed PARENT: server closed testSocket, listening CHILD: got socket CLIENT: got data CLIENT: closed events.js:167 throw er; // Unhandled 'error' event ^ Error: write EPIPE at ChildProcess.target._send (internal/child_process.js:741:20) at ChildProcess.target.send (internal/child_process.js:625:19) at SocketListSend._request (internal/socket_list.js:20:16) at SocketListSend.close (internal/socket_list.js:40:10) at Server.close (net.js:1624:24) at Socket.<anonymous> (c:\workspace\node-test-binary-windows\test\parallel\test-child-process-fork-net.js:178:16) at Socket.emit (events.js:182:13) at TCP._handle.close [as _onclose] (net.js:596:12) Emitted 'error' event at: at process.nextTick (internal/child_process.js:745:39) at process._tickCallback (internal/process/next_tick.js:61:11) ...

jasnell pushed a commit that referenced this pull request May 23, 2018
We are currently having issues with test-child-process-fork-net on
Windows CI. Debugging is slightly hampered by the mix of `console.log()`
and `console.error()` as our test runner does not interleave stdout and
stderr, so the order of output is not preserved. Change the sole
instance of `console.error()` to `console.log()` to improve
debugability.
While editing, I also took the opportunity to add capitalization and
punctuation to comments (as that is a nit we see from time to time and
there is a potential ESLint rule to enforce the capitalization part).
PR-URL: #20873
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@jasnell

Copy link
Copy Markdown
Member

Landed in c82a958

@jasnelljasnell closed this May 23, 2018
targos pushed a commit that referenced this pull request May 25, 2018
We are currently having issues with test-child-process-fork-net on
Windows CI. Debugging is slightly hampered by the mix of `console.log()`
and `console.error()` as our test runner does not interleave stdout and
stderr, so the order of output is not preserved. Change the sole
instance of `console.error()` to `console.log()` to improve
debugability.
While editing, I also took the opportunity to add capitalization and
punctuation to comments (as that is a nit we see from time to time and
there is a potential ESLint rule to enforce the capitalization part).
PR-URL: #20873
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request May 29, 2018
@Trott
Trott deleted the improve-debugability branch January 13, 2022 22:49
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-trackPRs that do not need to wait for 48 hours to land.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@Trott@jasnell@lpinca@cjihrig@richardlau@trivikr@nodejs-github-bot