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: #1461
PR-URL: #1836
Reviewed-By: Ben Noordhuis <[email protected]>
  • Loading branch information
joaocgreis authored and orangemocha committed Jun 3, 2015
1 parent f78c722 commit b18604b
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 b18604b

Please sign in to comment.