Skip to content

Commit 8377374

Browse files
shigekiaddaleax
authored andcommitted
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: #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]>
1 parent d6ac192 commit 8377374

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/parallel/test-tls-alpn-server-client.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ if (!common.hasCrypto) {
66
return;
77
}
88

9-
if (!process.features.tls_alpn) {
10-
console.error('Skipping because node compiled without OpenSSL or ' +
11-
'with old OpenSSL version.');
12-
process.exit(0);
9+
if (!process.features.tls_alpn || !process.features.tls_npn) {
10+
common.skip('Skipping because node compiled without NPN or ALPN' +
11+
' feature of OpenSSL.');
12+
return;
1313
}
1414

1515
const assert = require('assert');

test/parallel/test-tls-npn-server-client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22
const common = require('../common');
33
if (!process.features.tls_npn) {
4-
common.skip('node compiled without OpenSSL or ' +
5-
'with old OpenSSL version.');
4+
common.skip('Skipping because node compiled without NPN feature of' +
5+
' OpenSSL.');
66
return;
77
}
88

0 commit comments

Comments
 (0)