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
fix(test): make upgrade test pass #1772
Conversation
@@ -34,7 +34,7 @@ var FAST_CLIENT; | |||
var SERVER; | |||
|
|||
if (SKIP_IP_V6) { | |||
console.warning('IPv6 tests are skipped: No IPv6 network is available'); | |||
console.warn('IPv6 tests are skipped: No IPv6 network is available'); |
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.
@hekike 😂
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.
This is why Travis was skipping the rest of the tests. Not sure why this wouldn't cause an error code though.
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.
ooups, VW
Looks like this commit in 10.10.0 is likely related: It seems calling resume won't do anything unless I have a |
@@ -174,8 +174,7 @@ test('Dueling upgrade and response handling 1', function(t) { | |||
} | |||
|
|||
try { | |||
var upg = res.claimUpgrade(); | |||
upg.socket.destroy(); |
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.
This was removed because the claimUpgrade()
call is what throws, so this line is never executed.
This is because of a typo
The test did not have a listener for the |
Pre-Submission Checklist
make prepush
Issues
Two issues.
Upgrade tests are failing locally (and likely on CI), but we didn't know about it. Travis isn't running all of the nodeunit tests for some reason (??). We need to investigate.
Something has changed in recent Node 10 release, perhaps a lifecycle ordering change or something else like we saw previously. The upgrade test is currently set up in a way that requires proper response lifecycle cleanup to exit properly. This doesn't seem to be happening, as calling
res.resume()
on an upgraded request isn't triggering the correct behavior to allow the server to "close/resume" the response from restify, which leaves the client hanging.Changes
I updated the test to exit the test earlier and not depend on proper response cleanup, as I suspect in the field we wouldn't really want to be encouraging the kind of scenarios exhibited by this test anyway. This kind of usage should be fatal.
That said, it's probably worth digging further into what's causing this breakage between Node8 => Node10. There may be other issues we uncover along the way.