-
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: refactor test-dgram-send-callback-recursive #5079
Closed
santigimeno
wants to merge
1
commit into
nodejs:master
from
santigimeno:test-dgram-send-callback-recursive
Closed
test: refactor test-dgram-send-callback-recursive #5079
santigimeno
wants to merge
1
commit into
nodejs:master
from
santigimeno:test-dgram-send-callback-recursive
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jasnell
added
lts-watch-v4.x
test
Issues and PRs related to the tests.
dgram
Issues and PRs related to the dgram subsystem / UDP.
labels
Feb 4, 2016
client.send( | ||
chunk, 0, chunk.length, common.PORT, common.localhostIPv4, onsend); | ||
} else { | ||
assert.equal(async, true, 'Send should be asynchronous.'); |
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.
Can you use strictEqual()
here.
LGTM with one comment. |
Just send 10 messages recursively and check that the send calls are asynchronous by asserting that a `setImmediate` callback has been called in-between. It avoids a race condition in the test when the recursive limit is reached without having received at least 10 messages.
santigimeno
force-pushed
the
test-dgram-send-callback-recursive
branch
from
February 4, 2016 19:22
f6c274b
to
9616b88
Compare
Updated. Thanks! |
LGTM |
mcollina
pushed a commit
to mcollina/node
that referenced
this pull request
Feb 26, 2016
Just send 10 messages recursively and check that the send calls are asynchronous by asserting that a `setImmediate` callback has been called in-between. It avoids a race condition in the test when the recursive limit is reached without having received at least 10 messages. Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: nodejs#5079
Landed in 8872840. |
rvagg
pushed a commit
that referenced
this pull request
Feb 27, 2016
Just send 10 messages recursively and check that the send calls are asynchronous by asserting that a `setImmediate` callback has been called in-between. It avoids a race condition in the test when the recursive limit is reached without having received at least 10 messages. Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: #5079
rvagg
pushed a commit
that referenced
this pull request
Feb 27, 2016
Just send 10 messages recursively and check that the send calls are asynchronous by asserting that a `setImmediate` callback has been called in-between. It avoids a race condition in the test when the recursive limit is reached without having received at least 10 messages. Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: #5079
MylesBorins
pushed a commit
that referenced
this pull request
Mar 1, 2016
Just send 10 messages recursively and check that the send calls are asynchronous by asserting that a `setImmediate` callback has been called in-between. It avoids a race condition in the test when the recursive limit is reached without having received at least 10 messages. Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: #5079
MylesBorins
pushed a commit
that referenced
this pull request
Mar 1, 2016
Just send 10 messages recursively and check that the send calls are asynchronous by asserting that a `setImmediate` callback has been called in-between. It avoids a race condition in the test when the recursive limit is reached without having received at least 10 messages. Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: #5079
MylesBorins
pushed a commit
that referenced
this pull request
Mar 2, 2016
Just send 10 messages recursively and check that the send calls are asynchronous by asserting that a `setImmediate` callback has been called in-between. It avoids a race condition in the test when the recursive limit is reached without having received at least 10 messages. Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: #5079
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Just send 10 messages recursively and check that the send calls are
asynchronous by asserting that a
setImmediate
callback has been calledin-between. It avoids a race condition in the test where the recursive
limit is reached without having received at least 10 messages.
I was sometimes getting this error in OS X:
I've verified this test fails with node before the commit where this test was introduced: 18d457b and passes after this commit: b5cd2f0 when the
libuv
implementation of udp send was made asynchronous.