Skip to content

Commit

Permalink
test: fix tests when npn feature is disabled.
Browse files Browse the repository at this point in the history
ALPN test needs NPN feature to run. It also change the messages when
ALPN and NPN tests are skipped.

Fixes: #11650
PR-URL: #11655
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
  • Loading branch information
shigeki committed Mar 3, 2017
1 parent 02c98f4 commit 1824bbb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions test/parallel/test-tls-alpn-server-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-tls-npn-server-client.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';
const common = require('../common');
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;
}

Expand Down

0 comments on commit 1824bbb

Please sign in to comment.