★ wanayoo — archive 1999 https://github.com/nodejs/node/pull/18508Nouvelle recherche | Portail wanayoo
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: refactor test-http-abort-before-end #18508

Merged
merged 1 commit into from Feb 7, 2018
Merged

test: refactor test-http-abort-before-end #18508

merged 1 commit into from Feb 7, 2018

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Feb 1, 2018 •

This test was added over six years ago, and the behavior seems to have changed since then. When the test was originally written, common.mustCall() did not exist. The only assertion in this test was not actually executing. Instead of an 'error' event being emitted as expected, an 'abort' event was emitted.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

lpinca
lpinca approved these changes Feb 1, 2018
@lpinca
Copy link
Member

@lpinca lpinca commented Feb 1, 2018 •

Change lgtm but why does it fixes the connect EADDRNOTAVAIL error?
Edit with answer: because 'abort' is emitted in the next tick.

@cjihrig
Copy link
Contributor Author

@cjihrig cjihrig commented Feb 1, 2018

My guess is some race between req.end() and server.close(). This change waits to call server.close() until we've received the event we're looking for.

@cjihrig
Copy link
Contributor Author

@cjihrig cjihrig commented Feb 1, 2018 •

Actually, now that I say that, I don't think that would cause EADDRNOTAVAIL. I still think the change is preferable though.

jasnell
jasnell approved these changes Feb 2, 2018
@BridgeAR
Copy link
Member

@BridgeAR BridgeAR commented Feb 6, 2018

@cjihrig please always trigger a CI after opening a new PR :-)

This test was added over six years ago, and the behavior
seems to have changed since then. When the test was originally
written, common.mustCall() did not exist. The only assertion
in this test was not actually executing. Instead of an 'error'
event being emitted as expected, an 'abort' event was emitted.

PR-URL: nodejs#18508
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@cjihrig
Copy link
Contributor Author

@cjihrig cjihrig commented Feb 7, 2018

@cjihrig cjihrig merged commit ffb385b into nodejs:master Feb 7, 2018
@cjihrig cjihrig deleted the test branch Feb 7, 2018
MylesBorins added a commit that referenced this issue Feb 21, 2018
This test was added over six years ago, and the behavior
seems to have changed since then. When the test was originally
written, common.mustCall() did not exist. The only assertion
in this test was not actually executing. Instead of an 'error'
event being emitted as expected, an 'abort' event was emitted.

PR-URL: #18508
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins added a commit that referenced this issue Feb 21, 2018
This test was added over six years ago, and the behavior
seems to have changed since then. When the test was originally
written, common.mustCall() did not exist. The only assertion
in this test was not actually executing. Instead of an 'error'
event being emitted as expected, an 'abort' event was emitted.

PR-URL: #18508
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins added a commit that referenced this issue Feb 21, 2018
This test was added over six years ago, and the behavior
seems to have changed since then. When the test was originally
written, common.mustCall() did not exist. The only assertion
in this test was not actually executing. Instead of an 'error'
event being emitted as expected, an 'abort' event was emitted.

PR-URL: #18508
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Feb 21, 2018
gibfahn added a commit that referenced this issue Apr 13, 2018
This test was added over six years ago, and the behavior
seems to have changed since then. When the test was originally
written, common.mustCall() did not exist. The only assertion
in this test was not actually executing. Instead of an 'error'
event being emitted as expected, an 'abort' event was emitted.

PR-URL: #18508
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
gibfahn added a commit that referenced this issue Apr 13, 2018
This test was added over six years ago, and the behavior
seems to have changed since then. When the test was originally
written, common.mustCall() did not exist. The only assertion
in this test was not actually executing. Instead of an 'error'
event being emitted as expected, an 'abort' event was emitted.

PR-URL: #18508
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Apr 13, 2018
@MylesBorins MylesBorins mentioned this pull request May 2, 2018
MayaLekova added a commit to MayaLekova/node that referenced this issue May 8, 2018
This test was added over six years ago, and the behavior
seems to have changed since then. When the test was originally
written, common.mustCall() did not exist. The only assertion
in this test was not actually executing. Instead of an 'error'
event being emitted as expected, an 'abort' event was emitted.

PR-URL: nodejs#18508
Reviewed-By: Luigi Pinca <luigipinca@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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants