f34ce41345
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
24 lines
1.3 KiB
Diff
24 lines
1.3 KiB
Diff
diff --git a/test/parallel/test-tls-alpn-server-client.js b/test/parallel/test-tls-alpn-server-client.js
|
|
index 522dd34ad2..3f0ee2a0f9 100644
|
|
--- a/test/parallel/test-tls-alpn-server-client.js
|
|
+++ b/test/parallel/test-tls-alpn-server-client.js
|
|
@@ -195,7 +195,8 @@ function TestALPNCallback() {
|
|
|
|
// Callback picks 2nd preference => undefined => ALPN rejected:
|
|
assert.strictEqual(results[1].server, undefined);
|
|
- assert.strictEqual(results[1].client.error.code, 'ECONNRESET');
|
|
+ const allowedErrors = ['ECONNRESET', 'ERR_SSL_TLSV1_ALERT_NO_APPLICATION_PROTOCOL'];
|
|
+ assert.ok(allowedErrors.includes(results[1].client.error.code), `'${results[1].client.error.code}' was not one of ${allowedErrors}.`);
|
|
|
|
TestBadALPNCallback();
|
|
});
|
|
@@ -218,7 +219,8 @@ function TestBadALPNCallback() {
|
|
runTest(clientsOptions, serverOptions, function(results) {
|
|
// Callback returns 'http/5' => doesn't match client ALPN => error & reset
|
|
assert.strictEqual(results[0].server, undefined);
|
|
- assert.strictEqual(results[0].client.error.code, 'ECONNRESET');
|
|
+ const allowedErrors = ['ECONNRESET', 'ERR_SSL_TLSV1_ALERT_NO_APPLICATION_PROTOCOL'];
|
|
+ assert.ok(allowedErrors.includes(results[0].client.error.code), `'${results[0].client.error.code}' was not one of ${allowedErrors}.`);
|
|
|
|
TestALPNOptionsCallback();
|
|
});
|