Browse Source

test: running tls-server-verify clients in parallel

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: https://github.com/joyent/node/pull/25368
v0.12.5-release
João Reis 10 years ago
committed by Alexis Campailla
parent
commit
1191e651e4
  1. 16
      test/simple/test-tls-server-verify.js

16
test/simple/test-tls-server-verify.js

@ -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);
}
});
}
}
}
});
}

Loading…
Cancel
Save