From 7cc4645b701608e7fd067cd2be0f9c474284a384 Mon Sep 17 00:00:00 2001 From: Shigeki Ohtsu Date: Thu, 2 Mar 2017 23:19:49 +0900 Subject: [PATCH] test: fix tests when npn feature is disabled. ALPN test needs NPN feature to run. It also change the messages when ALPN and NPN tests are skipped. Fixes: https://github.com/nodejs/node/issues/11650 PR-URL: https://github.com/nodejs/node/pull/11655 Reviewed-By: James M Snell Reviewed-By: Michael Dawson Reviewed-By: Ben Noordhuis Reviewed-By: Fedor Indutny --- test/parallel/test-tls-alpn-server-client.js | 8 ++++---- test/parallel/test-tls-npn-server-client.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-tls-alpn-server-client.js b/test/parallel/test-tls-alpn-server-client.js index ca5785b09ac05a..9199d946791084 100644 --- a/test/parallel/test-tls-alpn-server-client.js +++ b/test/parallel/test-tls-alpn-server-client.js @@ -6,10 +6,10 @@ if (!common.hasCrypto) { return; } -if (!process.features.tls_alpn) { - console.error('Skipping because node compiled without OpenSSL or ' + - 'with old OpenSSL version.'); - process.exit(0); +if (!process.features.tls_alpn || !process.features.tls_npn) { + common.skip('Skipping because node compiled without NPN or ALPN' + + ' feature of OpenSSL.'); + return; } const assert = require('assert'); diff --git a/test/parallel/test-tls-npn-server-client.js b/test/parallel/test-tls-npn-server-client.js index fdc42dab6968d9..2369673073c6d7 100644 --- a/test/parallel/test-tls-npn-server-client.js +++ b/test/parallel/test-tls-npn-server-client.js @@ -1,7 +1,7 @@ 'use strict'; if (!process.features.tls_npn) { - common.skip('node compiled without OpenSSL or ' + - 'with old OpenSSL version.'); + common.skip('Skipping because node compiled without NPN feature of' + + ' OpenSSL.'); return; }