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: add coverage for socket write after close #13171

Merged
merged 1 commit into from May 26, 2017

Conversation

Projects
None yet
8 participants
@cjihrig
Copy link
Contributor

commented May 23, 2017

This commit adds test coverage for the scenario where a socket's
handle has been closed prior to writing.

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

@mscdex mscdex added the net label May 23, 2017

test/parallel/test-net-socket-write-after-close.js Outdated
const client = net.connect({port}, common.mustCall(() => {
client.on('error', common.mustCall((err) => {
server.close();
assert.strictEqual(err.message, 'write EBADF');

This comment has been minimized.

Copy link
@lpinca

lpinca May 23, 2017

Member

Nit: can we add an assertion for the error class?

assert.strictEqual(err.constructor, Error);
@lpinca

lpinca approved these changes May 23, 2017

@mhdawson
Copy link
Member

left a comment

LGTM

@cjihrig cjihrig force-pushed the cjihrig:connect branch 2 times, most recently May 25, 2017

@cjihrig

This comment has been minimized.

Copy link
Contributor Author

commented May 25, 2017

@refack

refack approved these changes May 26, 2017

test: add coverage for socket write after close
This commit adds test coverage for the scenario where a socket's
handle has been closed prior to writing.

PR-URL: #13171
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>

@cjihrig cjihrig force-pushed the cjihrig:connect branch to 6a18c1d May 26, 2017

@cjihrig cjihrig merged commit 6a18c1d into nodejs:master May 26, 2017

@cjihrig cjihrig deleted the cjihrig:connect branch May 26, 2017

jasnell added a commit that referenced this pull request May 28, 2017

test: add coverage for socket write after close
This commit adds test coverage for the scenario where a socket's
handle has been closed prior to writing.

PR-URL: #13171
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>

@jasnell jasnell referenced this pull request May 28, 2017

Closed

8.0.0 Release Proposal #12220

@gibfahn gibfahn referenced this pull request Jun 15, 2017

Closed

Auditing for 6.11.1 #230

2 of 3 tasks complete

MylesBorins added a commit that referenced this pull request Jul 17, 2017

test: add coverage for socket write after close
This commit adds test coverage for the scenario where a socket's
handle has been closed prior to writing.

PR-URL: #13171
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>

@MylesBorins MylesBorins referenced this pull request Jul 18, 2017

Merged

v6.11.2 proposal #14356

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.