test: fix test-cluster-send-handle-large-payload by Trott · Pull Request #14780 · nodejs/node

@Trott

On macOS, the parent process might not receive a message if it
is sent to soon, and then subsequent messages are also sometimes not
received.

(Is this a bug or expected operating system behavior like the
way a file watcher is returned before it's actually watching the file
system on/ macOS?)

Send a second message after a delay on macOS.

While at it, minor refactoring to the test:

* Blank line after loading `common` module per test-writing guide
* Wrap arrow function in braces where implicit return is not needed
* Remove unnecessary unref in subprocess

Fixes: nodejs#14747

@Trott added cluster

Issues and PRs related to the cluster subsystem.

macos

Issues and PRs related to the macOS platform / OSX.

test

Issues and PRs related to the tests.

labels

Aug 12, 2017

@Trott Trott mentioned this pull request

Aug 12, 2017

Trott added a commit to Trott/io.js that referenced this pull request

Aug 14, 2017
On macOS, the parent process might not receive a message if it
is sent to soon, and then subsequent messages are also sometimes not
received.

(Is this a bug or expected operating system behavior like the
way a file watcher is returned before it's actually watching the file
system on/ macOS?)

Send a second message after a delay on macOS.

While at it, minor refactoring to the test:

* Blank line after loading `common` module per test-writing guide
* Wrap arrow function in braces where implicit return is not needed
* Remove unnecessary unref in subprocess

PR-URL: nodejs#14780
Fixes: nodejs#14747
Reviewed-By: Anna Henningsen <anna@addaleax.net>

@Trott Trott mentioned this pull request

Aug 14, 2017

MylesBorins pushed a commit that referenced this pull request

Sep 10, 2017
On macOS, the parent process might not receive a message if it
is sent to soon, and then subsequent messages are also sometimes not
received.

(Is this a bug or expected operating system behavior like the
way a file watcher is returned before it's actually watching the file
system on/ macOS?)

Send a second message after a delay on macOS.

While at it, minor refactoring to the test:

* Blank line after loading `common` module per test-writing guide
* Wrap arrow function in braces where implicit return is not needed
* Remove unnecessary unref in subprocess

PR-URL: #14780
Fixes: #14747
Reviewed-By: Anna Henningsen <anna@addaleax.net>