Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented May 21, 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).

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).
@Trott Trott added the fast-track PRs that do not need to wait for 48 hours to land. label May 21, 2018
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label May 21, 2018
@Trott
Copy link
Member Author

Trott commented May 21, 2018

@Trott
Copy link
Member Author

Trott commented May 21, 2018

@Trott
Copy link
Member Author

Trott commented May 21, 2018

@Trott
Copy link
Member Author

Trott commented May 21, 2018

@Trott
Copy link
Member Author

Trott commented May 21, 2018

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
Member

jasnell commented May 23, 2018

Landed in c82a958

@jasnell jasnell 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>
@MylesBorins MylesBorins mentioned this pull request May 29, 2018
@Trott Trott deleted the improve-debugability branch January 13, 2022 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fast-track PRs that do not need to wait for 48 hours to land. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants