GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: fix net-server-max-connections-close-makes-more-available by santigimeno · Pull Request #1881 · nodejs/node

Conversation

@santigimeno

@santigimeno santigimeno commented Jun 3, 2015

Copy link
Copy Markdown
Member
  • Handle connection 'error' event so the test ends.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@santigimeno

santigimeno commented Jun 3, 2015

Copy link
Copy Markdown
Member Author

Before this change I was getting this error:

creating connection 0
sending message: 0
received message: 0
connection 0 received response
creating connection 1
sending message: 1
events.js:141
      throw er; // Unhandled 'error' event
            ^
Error: read ECONNRESET
    at exports._errnoException (util.js:846:11)
    at TCP.onread (net.js:540:26)

Not sure if this change is correct though, as I'm not familiar with Promises

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Jun 3, 2015

Copy link
Copy Markdown
Member

I am not getting this error :

➜  io.js git:(master) ✗ ./iojs test/parallel/test-net-server-max-connections-close-makes-more-available.js
creating connection 0
sending message: 0
received message: 0
connection 0 received response
creating connection 1
sending message: 1
ending 1
closing connection 0
ending 0
creating connection 2
sending message: 2
received message: 2
connection 2 received response
creating connection 3
sending message: 3
ending 3
closing connection 2
ending 2

Is this error event supposed to be emitted ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@santigimeno

santigimeno commented Jun 3, 2015

Copy link
Copy Markdown
Member Author

I'm getting this error consistently in a FreeBSD 10.1 box

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Jun 3, 2015

Copy link
Copy Markdown
Member

Refs #1855 and /cc @brendanashworth @Trott

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@santigimeno
test: fix net-server-max-connections-close-makes-more-available
75bc3ee
- Handle connection 'error' event so the test ends.
@Fishrock123 Fishrock123 added the test Issues and PRs related to Node.js core tests and test infrastructure. label Jun 3, 2015
Trott
Trott reviewed Jun 3, 2015
View reviewed changes
Comment thread test/parallel/test-net-server-max-connections-close-makes-more-available.js Outdated

@Trott Trott Jun 3, 2015

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Perhaps add a check to make sure the err.code is ECONNRESET just to make sure some other problem doesn't mask an issue here?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Trott

Trott commented Jun 3, 2015

Copy link
Copy Markdown
Member

This isn't happening for me (just built from master on OS X). If some setups send ECONNRESET and others just silently drop the connection, that's probably a bigger bug than just tweaking this test, yeah? (Although I suppose there may be OS-specific limitations on what types of errors can be retrieved. That doesn't seem likely to be an issue with this, though.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind

silverwind commented Jun 3, 2015

Copy link
Copy Markdown
Contributor

This test failed on a bunch of platforms before: https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/758/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brendanashworth

brendanashworth commented Jun 3, 2015

Copy link
Copy Markdown
Contributor

I should have run the test on the CI, sorry for that. But there does seem to be an issue if an ECONNRESET is thrown on some platforms and not others.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Jun 3, 2015

Copy link
Copy Markdown
Member

This version in this pull request is failing for me on OS X:

assert.js:88
  throw new assert.AssertionError({
        ^
AssertionError: [] deepEqual [ 1, 3 ]
    at process.<anonymous> (/Users/trott/io.js/test/parallel/test-net-server-max-connections-close-makes-more-available.js:87:10)
    at emitOne (events.js:82:20)
    at process.emit (events.js:169:7)

This would seem to suggest that whether or not an error event is triggered when a connection is rejected may be platform-dependent. It would also seem to me that the FreeBSD behavior is correct (and the test should more resemble what's in this pull request) and the OS X behavior is a bug.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind

silverwind commented Jun 3, 2015

Copy link
Copy Markdown
Contributor

CI with this PR: https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/759/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@santigimeno

santigimeno commented Jun 3, 2015

Copy link
Copy Markdown
Member Author

@Trott I have applied your suggestions
Also I have removed the failed check so it passes in other platforms, but I agree that it looks like a bug

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brendanashworth

brendanashworth commented Jun 3, 2015

Copy link
Copy Markdown
Contributor

CI is happy, I'm happy.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott Trott mentioned this pull request Jun 3, 2015
net: server.maxConnections does not trigger error on some platforms #1885
Closed
@Trott

Trott commented Jun 3, 2015

Copy link
Copy Markdown
Member

I created an issue for the not-triggering-ECONNRESET thing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brendanashworth

brendanashworth commented Jun 3, 2015

Copy link
Copy Markdown
Contributor

We should get this in. LGTM.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Jun 3, 2015

Copy link
Copy Markdown
Member

LGTM

(Not sure if my LGTM counts for anything, but if it doesn't count for nothing, then there it is.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

brendanashworth pushed a commit that referenced this pull request Jun 3, 2015
@santigimeno @brendanashworth
test: fix broken FreeBSD test
a804026
Fixes net-server-max-connections-close-makes-more-available
Handles connection 'error' event so the test ends.

PR-URL: #1881
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Brendan Ashworth <[email protected]>
@brendanashworth

brendanashworth commented Jun 3, 2015

Copy link
Copy Markdown
Contributor

Thanks everyone, landed in a804026. (I had to fix the commit log a little bit)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brendanashworth brendanashworth closed this Jun 3, 2015
@cjihrig cjihrig mentioned this pull request Jun 3, 2015
[libuv] upgrade to 1.6.0 #1889
Closed
@rvagg rvagg mentioned this pull request Jun 11, 2015
Release proposal: 2.3.0 #1939
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@santigimeno @targos @bnoordhuis @Trott @silverwind @brendanashworth @Fishrock123
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.