FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: fix flaky test-cluster-send-handle-twice by Trott · Pull Request #19700 · nodejs/node · GitHub

/ node Public

test: fix flaky test-cluster-send-handle-twice - #19700

Closed
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:fix-send-twice
Closed

test: fix flaky test-cluster-send-handle-twice#19700
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:fix-send-twice

Conversation

Trott commented Mar 30, 2018

Copy link
Copy Markdown
Member

Use common.mustCall() to make sure connection callback runs exactly
once.

Use connect event instead of setTimeout to avoid test failing if
timer runs before client is connected.

Remove cluster.worker.disconnect() after assert.fail(). It is
unreachable code that is unnecessary.

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

Use `common.mustCall()` to make sure connection callback runs exactly
once.

Use `connect` event instead of `setTimeout` to avoid test failing if
timer runs before client is connected.

Remove `cluster.worker.disconnect()` after `assert.fail()`. It is
unreachable code that is unnecessary.
nodejs-github-bot added the test Issues and PRs related to the tests. label Mar 30, 2018

Trott commented Mar 30, 2018
edited
Loading

Copy link
Copy Markdown
Member Author

Example failure of the current form of the test in CI: https://ci.nodejs.org/job/node-test-commit-freebsd/16565/nodes=freebsd10-64/console

not ok 474 parallel/test-cluster-send-handle-twice
  ---
  duration_ms: 120.28
  severity: fail
  stack: |-
    timeout
  ...

Trott commented Mar 30, 2018

Copy link
Copy Markdown
Member Author

Failure of current form of test reproduced locally:

$ tools/test.py -j 96 --repeat 192 test/parallel/test-cluster-send-handle-twice.js 
=== release test-cluster-send-handle-twice ===                    
Path: parallel/test-cluster-send-handle-twice
Command: out/Release/node /Users/trott/io.js/test/parallel/test-cluster-send-handle-twice.js
--- TIMEOUT ---
...
=== release test-cluster-send-handle-twice ===                   
Path: parallel/test-cluster-send-handle-twice
Command: out/Release/node /Users/trott/io.js/test/parallel/test-cluster-send-handle-twice.js
--- TIMEOUT ---
[04:01|% 100|+ 134|-  58]: Done   
$

Trott commented Mar 30, 2018

Copy link
Copy Markdown
Member Author

Success of test in this PR locally:

$ tools/test.py -j 96 --repeat 192 test/parallel/test-cluster-send-handle-twice.js 
[00:17|% 100|+ 192|-   0]: Done                
$

Trott commented Mar 30, 2018

Copy link
Copy Markdown
Member Author

process.send('send-handle-1', socket);
process.send('send-handle-2', socket);
});
}));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is very likely tested for very very often already.

BridgeAR added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Mar 30, 2018

Trott commented Apr 2, 2018
edited
Loading

Copy link
Copy Markdown
Member Author

Single CI failure seems unrelated. Re-running just that task: https://ci.nodejs.org/job/node-test-commit-plinux/16508/

(EDIT: Re-run is green.)

Trott added a commit to Trott/io.js that referenced this pull request Apr 2, 2018
Use `common.mustCall()` to make sure connection callback runs exactly
once.

Use `connect` event instead of `setTimeout` to avoid test failing if
timer runs before client is connected.

Remove `cluster.worker.disconnect()` after `assert.fail()`. It is
unreachable code that is unnecessary.

PR-URL: nodejs#19700
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

Trott commented Apr 2, 2018

Copy link
Copy Markdown
Member Author

Landed in 4d749e1

Trott closed this Apr 2, 2018
targos pushed a commit that referenced this pull request Apr 3, 2018
Use `common.mustCall()` to make sure connection callback runs exactly
once.

Use `connect` event instead of `setTimeout` to avoid test failing if
timer runs before client is connected.

Remove `cluster.worker.disconnect()` after `assert.fail()`. It is
unreachable code that is unnecessary.

PR-URL: #19700
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos mentioned this pull request Apr 4, 2018
BethGriggs pushed a commit that referenced this pull request Dec 4, 2018
Use `common.mustCall()` to make sure connection callback runs exactly
once.

Use `connect` event instead of `setTimeout` to avoid test failing if
timer runs before client is connected.

Remove `cluster.worker.disconnect()` after `assert.fail()`. It is
unreachable code that is unnecessary.

PR-URL: #19700
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BethGriggs mentioned this pull request Dec 4, 2018
Trott deleted the fix-send-twice branch January 13, 2022 22:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL