Skip to content

test: fix flaky test-dgram-empty-packet & friends - #9724

Closed
Trott wants to merge 4 commits into
nodejs:masterfrom
Trott:de-timer-ize
Closed

test: fix flaky test-dgram-empty-packet & friends#9724
Trott wants to merge 4 commits into
nodejs:masterfrom
Trott:de-timer-ize

Conversation

@Trott

@TrottTrott commented Nov 21, 2016

Copy link
Copy Markdown
Member
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test dgram

Description of change
  • Liberal use of common.mustCall()
  • Rename test-dgram-empty-packet -> test-dgram-send-empty-packet
  • Remove use of timers to avoid CI failures like seen in the Ref below:
not ok 237 parallel/test-dgram-empty-packet
---
duration_ms: 0.717
severity: fail
stack: |-
/usr/home/iojs/build/workspace/node-test-commit-freebsd/nodes/freebsd11-x64/test/parallel/test-dgram-empty-packet.js:38
throw new Error('Timeout');
^
Error: Timeout
at Timeout._onTimeout
(/usr/home/iojs/build/workspace/node-test-commit-freebsd/nodes/freebsd11-x64/test/parallel/test-dgram-empty-packet.js:38:11)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)

Refs: https://ci.nodejs.org/job/node-test-commit-freebsd/5341/nodes=freebsd11-x64/console:

@TrottTrott added dgram Issues and PRs related to the dgram subsystem / UDP. test Issues and PRs related to the tests. labels Nov 21, 2016
@Trott

Copy link
Copy Markdown
MemberAuthor

@Trott
Trottforce-pushed the de-timer-ize branch 2 times, most recently from f60c297 to 06c26b6CompareNovember 21, 2016 19:25
@cjihrig

Copy link
Copy Markdown
Contributor

Looks like the CI had a hiccup on OS X, which is pretty relevant to this test.

@Trott

Copy link
Copy Markdown
MemberAuthor

@cjihrig Yeah, looks like the bug on OS X is still there on the verison of OS X in CI. Putting the skip-code back in...

@Trott

Copy link
Copy Markdown
MemberAuthor

@Trott

Copy link
Copy Markdown
MemberAuthor

CI looks good. /cc @nodejs/testing @indutny

@santigimeno

Copy link
Copy Markdown
Member

The changes look good. I only see an issue with relying that every UDP message is going to be received by the server. This, though highly unlikely, could be a source of flakiness.

@Trott
Trottforce-pushed the de-timer-ize branch 3 times, most recently from b33bfca to c1c40fdCompareNovember 23, 2016 06:55
@Trott

Copy link
Copy Markdown
MemberAuthor

@santigimeno I've wrapped the client.send() call in setInterval() so that it will try again if the UDP message is not received.

CI: https://ci.nodejs.org/job/node-test-pull-request/4958/

@santigimenosantigimeno left a comment

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.

LGTM with a couple of suggestions. Thanks!

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.

maybe check that buffer is empty. Also s/bytes/info or even removing the 2nd argument if we're doing nothing with it

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.

check firstArg is empty too?

* Liberal use of common.mustCall()
* Rename test-dgram-empty-packet -> test-dgram-send-empty-packet
* Remove use of timers to avoid CI failures like seen in the Ref below:
```
not ok 237 parallel/test-dgram-empty-packet
---
duration_ms: 0.717
severity: fail
stack: |-
...
throw new Error('Timeout');
^
Error: Timeout
at Timeout._onTimeout
...
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
```
Refs: https://ci.nodejs.org/job/node-test-commit-freebsd/5341/nodes=freebsd11-x64/console:
@Trott

Copy link
Copy Markdown
MemberAuthor

Excellent suggestions from @santigimeno incorporated. CI again: https://ci.nodejs.org/job/node-test-pull-request/4978/

@Trott

Copy link
Copy Markdown
MemberAuthor

Raspberry Pi failure in CI is a build failure and unrelated.

Trott added a commit to Trott/io.js that referenced this pull request Nov 24, 2016
* Liberal use of common.mustCall()
* Rename test-dgram-empty-packet -> test-dgram-send-empty-packet
* Remove use of timers to avoid CI failures like seen in the Ref below:
```
not ok 237 parallel/test-dgram-empty-packet
---
duration_ms: 0.717
severity: fail
stack: |-
...
throw new Error('Timeout');
^
Error: Timeout
at Timeout._onTimeout
...
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
```
Refs: https://ci.nodejs.org/job/node-test-commit-freebsd/5341/nodes=freebsd11-x64/console:
PR-URL: nodejs#9724
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
@Trott

Copy link
Copy Markdown
MemberAuthor

Landed in 9b0f53d

@TrottTrott closed this Nov 24, 2016
addaleax pushed a commit that referenced this pull request Dec 5, 2016
* Liberal use of common.mustCall()
* Rename test-dgram-empty-packet -> test-dgram-send-empty-packet
* Remove use of timers to avoid CI failures like seen in the Ref below:
```
not ok 237 parallel/test-dgram-empty-packet
---
duration_ms: 0.717
severity: fail
stack: |-
...
throw new Error('Timeout');
^
Error: Timeout
at Timeout._onTimeout
...
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
```
Refs: https://ci.nodejs.org/job/node-test-commit-freebsd/5341/nodes=freebsd11-x64/console:
PR-URL: #9724
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
@Fishrock123Fishrock123 mentioned this pull request Dec 5, 2016
2 tasks
addaleax pushed a commit to addaleax/node that referenced this pull request Dec 8, 2016
* Liberal use of common.mustCall()
* Rename test-dgram-empty-packet -> test-dgram-send-empty-packet
* Remove use of timers to avoid CI failures like seen in the Ref below:
```
not ok 237 parallel/test-dgram-empty-packet
---
duration_ms: 0.717
severity: fail
stack: |-
...
throw new Error('Timeout');
^
Error: Timeout
at Timeout._onTimeout
...
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
```
Refs: https://ci.nodejs.org/job/node-test-commit-freebsd/5341/nodes=freebsd11-x64/console:
PR-URL: nodejs#9724
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
* Liberal use of common.mustCall()
* Rename test-dgram-empty-packet -> test-dgram-send-empty-packet
* Remove use of timers to avoid CI failures like seen in the Ref below:
```
not ok 237 parallel/test-dgram-empty-packet
---
duration_ms: 0.717
severity: fail
stack: |-
...
throw new Error('Timeout');
^
Error: Timeout
at Timeout._onTimeout
...
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
```
Refs: https://ci.nodejs.org/job/node-test-commit-freebsd/5341/nodes=freebsd11-x64/console:
PR-URL: #9724
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Dec 21, 2016
@Trott
Trott deleted the de-timer-ize branch January 13, 2022 22:44
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.

5 participants

@Trott@cjihrig@santigimeno@MylesBorins@addaleax