Skip to content

Commit

Permalink
test: running tls-server-verify clients in parallel
Browse files Browse the repository at this point in the history
OpenSSL s_client introduces some delay on Windows. With all clients
running sequentially, this delay is big enough to break CI. This fix runs
the clients in parallel (unless the test includes renegotiation),
reducing the total run time.

Fixes: nodejs#1461
PR-URL: nodejs#1836
Reviewed-By: Ben Noordhuis <[email protected]>
  • Loading branch information
joaocgreis committed Jun 3, 2015
1 parent 5b6f575 commit b40c86d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/parallel/test-tls-server-verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,21 @@ function runTest(testIndex) {
if (tcase.debug) {
console.error('TLS server running on port ' + common.PORT);
} else {
runNextClient(0);
if (tcase.renegotiate) {
runNextClient(0);
} else {
var clientsCompleted = 0;
for (var i = 0; i < tcase.clients.length; i++) {
runClient(tcase.clients[i], function() {
clientsCompleted++;
if (clientsCompleted === tcase.clients.length) {
server.close();
successfulTests++;
runTest(testIndex + 1);
}
});
}
}
}
});
}
Expand Down

0 comments on commit b40c86d

Please sign in to comment.