-
Notifications
You must be signed in to change notification settings - Fork 30k
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
test: fix tls-inception #4195
test: fix tls-inception #4195
Conversation
@@ -13,7 +13,6 @@ var path = require('path'); | |||
var net = require('net'); | |||
|
|||
var options, a, b, portA, portB; |
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.
FWIW portA
and portB
can be removed too, they're not used.
LGTM |
One nit from @mscdex , otherwise LGTM. Thanks! |
Make sure all the data is read before checking its validity. Remove `gotHello` variable and just check that the ssl `end` event is received. Remove unused variables.
When sending a very large buffer (400000 bytes) the test fails due to the client socket from the `a` server erroring with `ECONNRESET`. There's a race condition between the closing of this socket and the `ssl` socket closing on the other side of the connection. To improve things, destroy the socket as soon as possible: in the `end` event of the `dest` socket.
6929fc3
to
432a86e
Compare
Updated the PR removing the unused variables. I have also added a fix for the problems reported here #1012 (comment). I have sent this in a separate commit. Is this correct? or should I squash both commits into a single one? or a different PR? |
|
||
var body = new Buffer(4000).fill('A'); | ||
var body = new Buffer(400000).fill('A'); |
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.
I think this is a bit over the top, probably? What do you think about a compromise with a 40000
?
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.
I've used that value to reproduce the ECONNRESET
error in OS X
consistently.
LGTM, thank you! |
Unrelated test failures, landing! |
Make sure all the data is read before checking its validity. Remove `gotHello` variable and just check that the ssl `end` event is received. Remove unused variables. PR-URL: #4195 Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
When sending a very large buffer (400000 bytes) the test fails due to the client socket from the `a` server erroring with `ECONNRESET`. There's a race condition between the closing of this socket and the `ssl` socket closing on the other side of the connection. To improve things, destroy the socket as soon as possible: in the `end` event of the `dest` socket. PR-URL: #4195 Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
Thanks |
Make sure all the data is read before checking its validity. Remove `gotHello` variable and just check that the ssl `end` event is received. Remove unused variables. PR-URL: #4195 Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
When sending a very large buffer (400000 bytes) the test fails due to the client socket from the `a` server erroring with `ECONNRESET`. There's a race condition between the closing of this socket and the `ssl` socket closing on the other side of the connection. To improve things, destroy the socket as soon as possible: in the `end` event of the `dest` socket. PR-URL: #4195 Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
Make sure all the data is read before checking its validity. Remove `gotHello` variable and just check that the ssl `end` event is received. Remove unused variables. PR-URL: #4195 Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
When sending a very large buffer (400000 bytes) the test fails due to the client socket from the `a` server erroring with `ECONNRESET`. There's a race condition between the closing of this socket and the `ssl` socket closing on the other side of the connection. To improve things, destroy the socket as soon as possible: in the `end` event of the `dest` socket. PR-URL: #4195 Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
Make sure all the data is read before checking its validity. Remove `gotHello` variable and just check that the ssl `end` event is received. Remove unused variables. PR-URL: #4195 Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
When sending a very large buffer (400000 bytes) the test fails due to the client socket from the `a` server erroring with `ECONNRESET`. There's a race condition between the closing of this socket and the `ssl` socket closing on the other side of the connection. To improve things, destroy the socket as soon as possible: in the `end` event of the `dest` socket. PR-URL: #4195 Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
Make sure all the data is read before checking its validity. Remove `gotHello` variable and just check that the ssl `end` event is received. Remove unused variables. PR-URL: nodejs#4195 Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
When sending a very large buffer (400000 bytes) the test fails due to the client socket from the `a` server erroring with `ECONNRESET`. There's a race condition between the closing of this socket and the `ssl` socket closing on the other side of the connection. To improve things, destroy the socket as soon as possible: in the `end` event of the `dest` socket. PR-URL: nodejs#4195 Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
cherry-picked the following from master commit 3b94991 Author: Santiago Gimeno <[email protected]> Date: Tue Dec 8 14:57:22 2015 +0100 test: fix tls-inception flakiness When sending a very large buffer (400000 bytes) the test fails due to the client socket from the `a` server erroring with `ECONNRESET`. There's a race condition between the closing of this socket and the `ssl` socket closing on the other side of the connection. To improve things, destroy the socket as soon as possible: in the `end` event of the `dest` socket. PR-URL: nodejs/node#4195 Reviewed-By: Brian White <[email protected]> Reviewed-By: Fedor Indutny <[email protected]>
Make sure all the data is read before checking its validity.
Remove
gotHello
variable and just check that the sslend
eventis received.
/cc @indutny