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: fix flaky test-cluster-shared-leak #5802

Conversation

claudiorodriguez
Copy link
Contributor

Pull Request check-list

Please make sure to review and check all of these items:

  • Does make -j8 test (UNIX) or vcbuild test nosign (Windows) pass with
    this change (including linting)?
  • Is the commit message formatted according to CONTRIBUTING.md?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Affected core subsystem(s)

test

Description of change

Please provide a description of the change here.

Test was flaky on centos7-64 due to an uncaught ECONNRESET on the worker code. This catches the error so the process will exit with code 0.

Fixes: #5604

PS: I did consider retrying but ECONNRESET was already being disregarded on the cluster-master side of things, and the test itself is concerned with a particular assertion in cluster, but I'd still like some feedback on this.
You can reproduce the error by adding a timeout like this:

//...
conn.on('error', function(e) {
  // ECONNRESET is OK
  if (e.code !== 'ECONNRESET')
    throw e;
});
// add this and run the test a couple times:
setTimeout(function(){
  conn.destroy();
}, 5);
//...

Test was flaky on centos7-64 due to an uncaught ECONNRESET
on the worker code. This catches the error so the process
will exit with code 0.

Fixes: nodejs#5604
@claudiorodriguez claudiorodriguez added cluster Issues and PRs related to the cluster subsystem. test Issues and PRs related to the tests. labels Mar 19, 2016
@claudiorodriguez
Copy link
Contributor Author

P.P.S: not the first time centos has this kind of behaviour on the CI, there's several tests that had "flaky" behaviour because of prematurely closed connections in that platform. That probably warrants further investigation.

@claudiorodriguez
Copy link
Contributor Author

@Trott
Copy link
Member

Trott commented Mar 19, 2016

LGTM

@Trott
Copy link
Member

Trott commented Mar 19, 2016

@nodejs/testing

@Trott
Copy link
Member

Trott commented Mar 19, 2016

Confirmed that this still catches the error it's supposed to catch in Node v4.2.1.

@santigimeno
Copy link
Member

LGTM.
I've been able to reproduce the failure in OS X by stress testing it with nodejs/testing#3 (comment). The proposed patch fixed the error.

@jasnell
Copy link
Member

jasnell commented Mar 21, 2016

LGTM

@jasnell
Copy link
Member

jasnell commented Mar 21, 2016

I assume this is relevant for v4 also, please remove the lts-watch label if not! thanks!

jasnell pushed a commit that referenced this pull request Mar 21, 2016
Test was flaky on centos7-64 due to an uncaught ECONNRESET
on the worker code. This catches the error so the process
will exit with code 0.

Fixes: #5604
PR-URL: #5802
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

jasnell commented Mar 21, 2016

Landed in 74a703d

@jasnell jasnell closed this Mar 21, 2016
Fishrock123 pushed a commit that referenced this pull request Mar 22, 2016
Test was flaky on centos7-64 due to an uncaught ECONNRESET
on the worker code. This catches the error so the process
will exit with code 0.

Fixes: #5604
PR-URL: #5802
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 30, 2016
Test was flaky on centos7-64 due to an uncaught ECONNRESET
on the worker code. This catches the error so the process
will exit with code 0.

Fixes: #5604
PR-URL: #5802
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 30, 2016
Test was flaky on centos7-64 due to an uncaught ECONNRESET
on the worker code. This catches the error so the process
will exit with code 0.

Fixes: #5604
PR-URL: #5802
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cluster Issues and PRs related to the cluster subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants