Skip to content

test: allow out-of-order replies in dgram tests - #6607

Merged
addaleax merged 1 commit into
nodejs:masterfrom
addaleax:fix-udp-default-host-tests
May 10, 2016
Merged

test: allow out-of-order replies in dgram tests#6607
addaleax merged 1 commit into
nodejs:masterfrom
addaleax:fix-udp-default-host-tests

Conversation

@addaleax

Copy link
Copy Markdown
Member
Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • the commit message follows commit guidelines
Affected core subsystem(s)

test, dgram

Description of change

Allow out of order replies in the flaky test-dgram{-upd6,}-send-default-host.js files by sorting the incoming replies after receiving them.

Fixes: #6577

/cc @Trott@santigimeno

@addaleaxaddaleax added dgram Issues and PRs related to the dgram subsystem / UDP. test Issues and PRs related to the tests. labels May 5, 2016

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why are you passing toSend.length here?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Making sure that the message event is invoked for each message – otherwise the test would accept messages just being dropped.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Apologies, I missed it was an argument to mustCall.

@bnoordhuis

Copy link
Copy Markdown
Member

LGTM

@cjihrig

Copy link
Copy Markdown
Contributor

@santigimeno

Copy link
Copy Markdown
Member

LGTM

1 similar comment
@jasnell

Copy link
Copy Markdown
Member

LGTM

@mcollina

Copy link
Copy Markdown
Member

LGTM

@mcollina

Copy link
Copy Markdown
Member

BTW, can you please sweep through all dgram tests? I think I copied the structure of those from another one, which probably has the same issue.

@addaleax

Copy link
Copy Markdown
MemberAuthor

@mcollina I went through them and there seemed to be no other tests with this problem, just these two.

@mcollina

Copy link
Copy Markdown
Member

@addaleax thx for checking and fixing!

@addaleax
addaleaxforce-pushed the fix-udp-default-host-tests branch from 76d7b00 to 2e66c82CompareMay 10, 2016 05:43
Allow out of order replies in the flaky
`test-dgram{-upd6,}-send-default-host.js` files by sorting
the incoming replies after receiving them.
Fixes: nodejs#6577
PR-URL: nodejs#6607
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@addaleax
addaleaxforce-pushed the fix-udp-default-host-tests branch from 2e66c82 to c5a8bd5CompareMay 10, 2016 05:48
@addaleax
addaleax merged this pull request into nodejs:masterMay 10, 2016
@addaleax
addaleax deleted the fix-udp-default-host-tests branch May 10, 2016 05:53
addaleax added a commit to addaleax/node that referenced this pull request May 10, 2016
Allow out of order replies in the flaky
`test-dgram{-upd6,}-send-default-host.js` files by sorting
the incoming replies after receiving them.
PR-URL: nodejs#6607Fixes: nodejs#6577
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
evanlucas pushed a commit that referenced this pull request May 17, 2016
Allow out of order replies in the flaky
`test-dgram{-upd6,}-send-default-host.js` files by sorting
the incoming replies after receiving them.
PR-URL: #6607Fixes: #6577
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dgramIssues and PRs related to the dgram subsystem / UDP.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@addaleax@bnoordhuis@cjihrig@santigimeno@jasnell@mcollina@MylesBorins