-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: eliminate multicast test FreeBSD flakiness #4042
Conversation
This change moves |
With this change, 9999 consecutive successful runs on FreeBSD: Without this change, not so much: |
/cc @defunctzombie (to confirm that the test still does what it was written to do) |
new Buffer('Fourth message to send') | ||
]; | ||
const common = require('../common'), | ||
assert = require('assert'), |
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.
Since you're changing all of these lines, it would be awesome to split them into individual const
declaration statements.
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.
Sure, done.
I think we want to skip if we're in a freebsd jail here. |
test-dgram-multicast-multi-process was flaky on FreeBSD and Raspeberry Pi. This refactoring fixes the issue by eliminating a race condition. Fixes: nodejs#2474
Added code to skip test if in a FreeBSD jail per suggestion from @jbergstroem New CI: https://ci.nodejs.org/job/node-test-pull-request/872/ |
Bump. Anyone feel good enough about this for an LGTM? |
I won't be able to take a look until next week but am sure others can On Monday, November 30, 2015, Rich Trott [email protected] wrote:
|
const common = require('../common'); | ||
const assert = require('assert'); | ||
const dgram = require('dgram'); | ||
const Buffer = require('buffer').Buffer; |
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.
You can safely drop this, I think.
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.
Yup, done.
All nits un-nitted. Stress test: https://ci.nodejs.org/job/node-stress-single-test/93/nodes=freebsd102-64/ CI: (Clearly, I should get rid of the CI node-accept-pull-request bookmark...) |
if (dead === listeners) { | ||
console.error('[PARENT] All workers have died.'); | ||
console.error('[PARENT] Fail'); | ||
process.exit(1); |
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.
Not a nit, more a stream-of-consciousness remark, but I would have thrown an exception here.
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.
Not really a response but getting all stream-of-consciousness over here too: FWIW, I agree and probably would have chosen to throw an exception too and would have also not included console.error()
messages here and elsewhere in the test. But those are just my personal preferences and I only wanted to go so far in rewriting existing code. All this stuff was in the existing test. It only shows up as a change because the indentation changed and/or I moved it to a different location.
LGTM |
Landed in b3313aa |
test-dgram-multicast-multi-process was flaky on FreeBSD and Raspeberry Pi. This refactoring fixes the issue by eliminating a race condition. Fixes: nodejs#2474 PR-URL: nodejs#4042 Reviewed-By: Ben Noordhuis <[email protected]>
test-dgram-multicast-multi-process was flaky on FreeBSD and Raspeberry Pi. This refactoring fixes the issue by eliminating a race condition. Fixes: #2474 PR-URL: #4042 Reviewed-By: Ben Noordhuis <[email protected]>
test-dgram-multicast-multi-process was flaky on FreeBSD and Raspeberry Pi. This refactoring fixes the issue by eliminating a race condition. Fixes: #2474 PR-URL: #4042 Reviewed-By: Ben Noordhuis <[email protected]>
test-dgram-multicast-multi-process was flaky on FreeBSD and Raspeberry Pi. This refactoring fixes the issue by eliminating a race condition. Fixes: #2474 PR-URL: #4042 Reviewed-By: Ben Noordhuis <[email protected]>
test-dgram-multicast-multi-process was flaky on FreeBSD and Raspeberry Pi. This refactoring fixes the issue by eliminating a race condition. Fixes: nodejs#2474 PR-URL: nodejs#4042 Reviewed-By: Ben Noordhuis <[email protected]>
test-dgram-multicast-multi-process was flaky on FreeBSD and Raspeberry
Pi. This refactoring fixes the issue by eliminating a race condition.
Fixes: #2474