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 <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
  • Loading branch information
shigeki authored and MylesBorins committed Apr 19, 2017
1 parent b1ddf11 commit 7cc4645
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,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;
}

Expand Down

0 comments on commit 7cc4645

Please sign in to comment.