Uh oh!
There was an error while loading. Please reload this page.
test: defer abort with setTimeout - #15520
Conversation
mcollina
commented
Sep 21, 2017
ec53a15 to
71f0b14Comparemcollina
commented
Sep 21, 2017
71f0b14 to
cfaf6bfComparemcollina
commented
Sep 21, 2017
There was a problem hiding this comment.
Is it safe to call external.abort() and internalRes.end('Hello World\n'); here or does this invalidate the test?
This would remove the setTimeout dependency.
mcollina
commented
Sep 21, 2017
@lpinca the problem is that this test keeps failing only on Centos and I do not know why :( |
lpinca
commented
Sep 21, 2017
Yes that's weird, it looks like |
cjihrig
commented
Sep 21, 2017
While you're here, could you move the stuff from |
cfaf6bf to
8772804Comparemcollina
commented
Sep 21, 2017
8772804 to
a2ba6b8Comparemcollina
commented
Sep 21, 2017
a2ba6b8 to
a4c7be8Comparemcollina
commented
Sep 22, 2017
a4c7be8 to
9b36dfaComparemcollina
commented
Sep 22, 2017
9b36dfa to
643f8a8Comparemcollina
commented
Sep 22, 2017
643f8a8 to
830dda8Comparemcollina
commented
Sep 22, 2017
BridgeAR
commented
Sep 25, 2017
@mcollina we could also mark the test as being flaky on centos? |
830dda8 to
d349345Comparemcollina
commented
Sep 25, 2017
There was a problem hiding this comment.
This will test less than before, since the mustCall is not in place anymore. It might be worth to check that either finish or close will be called at least once? And I am somewhat surprised that our events are platform dependent. Would you be so kind and add a comment why that is the case?
There was a problem hiding this comment.
I have no idea on why it's the case, that's the major problem of this PR.
I'll see if I can get another solution as well.
I'll add another check that verifies that at least one of them is called.
d349345 to
717a67aComparemcollina
commented
Sep 25, 2017
mcollina
commented
Sep 25, 2017
061f7a9 to
f2061d8Comparemcollina
commented
Sep 26, 2017
CI: https://ci.nodejs.org/job/node-test-pull-request/10273/ This should be green, and it can land as it finshes. @jasnell@lpinca@cjihrig can you review it again so we can land? |
There was a problem hiding this comment.
I'd point out that this only happens on CentOS 5.
There was a problem hiding this comment.
I guess these are only for debugging. Do we want to keep them?
f2061d8 to
7d6a0aaComparemcollina
commented
Sep 26, 2017
@lpinca thanks, updated! |
There was a problem hiding this comment.
I guess this isn't needed after all.
There was a problem hiding this comment.
Is this called more than once on any platforms? Removing the listeners kind of defeats the purpose of wrapping it in common.mustCall().
There was a problem hiding this comment.
I guess the point is to ensure that the listener is actually called.
There was a problem hiding this comment.
Yes, but common.mustCall() also enforces the number of times the function is called. Removing the listeners means we lose that checking.
There was a problem hiding this comment.
I think either 'close' or 'finish' should be emitted so it doesn't matter as long as at least one is emitted.
There was a problem hiding this comment.
That's why I asked:
Is this called more than once on any platforms?
We shouldn't remove the listeners unless we really need to.
7d6a0aa to
adf649aComparemcollina
commented
Sep 27, 2017
adf649a to
dfd4c63Comparemcollina
commented
Sep 27, 2017
lpinca
commented
Sep 27, 2017
Still LGTM. |
mcollina
commented
Sep 27, 2017
Landed as 1fe9b53 |
Ref: nodejs#15404Fixes: nodejs#15505 PR-URL: nodejs#15520 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Ref: nodejs/node#15404Fixes: nodejs/node#15505 PR-URL: nodejs/node#15520 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Ref: #15404
Fixes: #15505
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test, http