summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Reis <reis@janeasystems.com>2015-05-22 14:16:07 +0100
committerAlexis Campailla <alexis@janeasystems.com>2015-06-03 19:11:17 +0200
commitb18604ba2c84cf282b58c9cc0f8bc07e04671a79 (patch)
treef8841aced407ad5eb3c788188584d11e0738299f
parentf78c722df5a254b27f4ae05d69dd03e1d2cb9ebc (diff)
downloadandroid-node-v8-b18604ba2c84cf282b58c9cc0f8bc07e04671a79.tar.gz
android-node-v8-b18604ba2c84cf282b58c9cc0f8bc07e04671a79.tar.bz2
android-node-v8-b18604ba2c84cf282b58c9cc0f8bc07e04671a79.zip
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. Fixes: https://github.com/nodejs/io.js/issues/1461 PR-URL: https://github.com/nodejs/io.js/pull/1836 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
-rw-r--r--test/parallel/test-tls-server-verify.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/parallel/test-tls-server-verify.js b/test/parallel/test-tls-server-verify.js
index f30134f04a..2db47d32d8 100644
--- a/test/parallel/test-tls-server-verify.js
+++ b/test/parallel/test-tls-server-verify.js
@@ -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);
+ }
+ });
+ }
+ }
}
});
}