Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

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.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #25368
  • Loading branch information
joaocgreis authored and orangemocha committed Jun 4, 2015
1 parent 85d670e commit 1191e65
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/simple/test-tls-server-verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,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 1191e65

Please sign in to comment.