Uh oh!
There was an error while loading. Please reload this page.
test: fix flaky test-net-can-reset-timeout - #14257
Conversation
Trott
commented
Jul 15, 2017
I would like to expedite this so that it doesn't trip us up during Code + Learn later. /cc @nodejs/testing @bengl@joyeecheung@addaleax@refack |
Trott
commented
Jul 15, 2017
With this change: $ tools/test.py -j 92 --repeat 920 test/parallel/test-net-can-reset-timeout.js[02:14|% 100|+ 920|- 0]: Done
$ To compare with before the change, see #14241 (comment). |
Trott
commented
Jul 15, 2017
There was a problem hiding this comment.
Just using .once instead seems a bit simpler?
refack
commented
Jul 15, 2017
@Trott I took the liberty of adding a comment with context, feel free to remove it, or whatever. |
Trott
commented
Jul 16, 2017
Switched to |
You didn't like my comment or just didn't see it? // When you write to a socket, it causes 'Timer.active' to be called on it.// If `active` notices that it was previously removed (perhaps it timed out or// something) it just does an 'inline append' which re-links the timer.// Ref: https://github.com/nodejs/node-v0.x-archive/issues/481 |
Trott
commented
Jul 16, 2017
I wasn't quite sure I understood it out of context. I thought reading the test was actually more clear than the comment, but that may say more about me than the comment? Thinking about it more, though, I think having a link to the issue is a good idea so I'll at least add that back in... |
Use `.once()` rather than `.on()` for timeout listener. Add comment with URL for issue explaining the purpose of the test. (h/t refack) PR-URL: nodejs#14257Fixes: nodejs#14241 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Trott
commented
Jul 16, 2017
Landed in 5d3609d |
Use `.once()` rather than `.on()` for timeout listener. Add comment with URL for issue explaining the purpose of the test. (h/t refack) PR-URL: #14257Fixes: #14241 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Use `.once()` rather than `.on()` for timeout listener. Add comment with URL for issue explaining the purpose of the test. (h/t refack) PR-URL: #14257Fixes: #14241 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Use `.once()` rather than `.on()` for timeout listener. Add comment with URL for issue explaining the purpose of the test. (h/t refack) PR-URL: #14257Fixes: #14241 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Use `.once()` rather than `.on()` for timeout listener. Add comment with URL for issue explaining the purpose of the test. (h/t refack) PR-URL: #14257Fixes: #14241 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Use `.once()` rather than `.on()` for timeout listener. Add comment with URL for issue explaining the purpose of the test. (h/t refack) PR-URL: #14257Fixes: #14241 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
timeoutcan fire more than once, so remove the listener after the first time. The test still checks for issue that the test was originally written for (nodejs/node-v0.x-archive#481).Fixes: #14241
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test net