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: eval mode net.listen should emit listening #1581

Closed
wants to merge 1 commit into from

Conversation

rmg
Copy link
Contributor

@rmg rmg commented May 1, 2015

I found this when trying to confirm the format of the address object. The following hangs on most releases of node higher than 0.10.38:

node -e "require('net').createServer().listen(0, function() { console.log(this.address()); this.close(); });"

It seems that Server does not emit a listen event when no address is specified and is called in eval mode.

I don't fully understand how the regression was introduced, but git bisect seemed pretty confident that it was in 5b636fe.

/to @trevnorris for the indicated commit
/cc @piscisaureus @sam-github

@mscdex mscdex added test Issues and PRs related to the tests. net Issues and PRs related to the net subsystem. labels May 1, 2015
];

// should exit cleanly almost immediately
cp.execFile(process.execPath, args, {timeout: 500}, assert.ifError);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not to be that guy but was the 500 timeout randomly picked? We want each test to exit as fast as possible so if this can be reduced, that'd be great - if not, thats okay too, thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was more or less arbitrary. I know some CI machines can be slow at things like forking, but I wasn't sure how slow. On the upside, the test is not CPU intensive and will run in parallel, so its impact on the suite overall should be extremely low.

Copy link
Contributor

Choose a reason for hiding this comment

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

okay, sweet, it shouldn't be an issue

Copy link
Contributor

Choose a reason for hiding this comment

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

500 is definitely too low for ARMv6, where a simple startup can take upwards of 3 seconds. I suggest using common.platformTimeout(1000), which right now applies factor 7 (7 seconds) for ARMv6.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@silverwind thanks the tip!

@brendanashworth
Copy link
Contributor

Confirmed -- would you mind opening an issue for this too so we can track it better?

@rmg
Copy link
Contributor Author

rmg commented May 3, 2015

Opened issue #1600.

Server does not emit a listen event when no address is specified and
is called in eval mode.

Regression introduced in 5b636fe.
@brendanashworth
Copy link
Contributor

Thanks for telling us about the bug! A fix is pending in #1793 - I'm closing this PR as it was decided to use the other test case. Thanks.

@rmg rmg deleted the listen-not-listening branch May 27, 2015 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants