From bec5d50f1e41cdaca4321c3a0d7642560e452e6b Mon Sep 17 00:00:00 2001 From: Shigeki Ohtsu Date: Wed, 4 May 2016 01:06:40 +0900 Subject: [PATCH] test: fix alpn tests for openssl1.0.2h https://github.com/openssl/openssl/commit/af2db04c9979554ada88d969da6332a827a47599 changed some ALPN behaviors. The tests when ALPN has no selection should be fixed because openssl was changed NPN callback to be invoked in this case. PR-URL: https://github.com/nodejs/node/pull/6552 Reviewed-By: Ben Noordhuis Reviewed-By: Shigeki Ohtsu --- test/parallel/test-tls-alpn-server-client.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/test/parallel/test-tls-alpn-server-client.js b/test/parallel/test-tls-alpn-server-client.js index a9fe0b84d4ca5f..498db9b3c0a24e 100644 --- a/test/parallel/test-tls-alpn-server-client.js +++ b/test/parallel/test-tls-alpn-server-client.js @@ -99,8 +99,8 @@ function Test1() { client: {ALPN: 'b', NPN: undefined}}); // nothing is selected by ALPN checkResults(results[2], - {server: {ALPN: false, NPN: false}, - client: {ALPN: false, NPN: undefined}}); + {server: {ALPN: false, NPN: 'first-priority-unsupported'}, + client: {ALPN: false, NPN: false}}); // execute next test Test2(); }); @@ -132,8 +132,8 @@ function Test2() { client: {ALPN: 'b', NPN: undefined}}); // nothing is selected by ALPN checkResults(results[2], - {server: {ALPN: false, NPN: false}, - client: {ALPN: false, NPN: undefined}}); + {server: {ALPN: false, NPN: 'http/1.1'}, + client: {ALPN: false, NPN: false}}); // execute next test Test3(); }); @@ -224,8 +224,9 @@ function Test5() { checkResults(results[1], {server: {ALPN: 'b', NPN: false}, client: {ALPN: 'b', NPN: undefined}}); // nothing is selected by ALPN - checkResults(results[2], {server: {ALPN: false, NPN: false}, - client: {ALPN: false, NPN: undefined}}); + checkResults(results[2], {server: {ALPN: false, + NPN: 'first-priority-unsupported'}, + client: {ALPN: false, NPN: false}}); // execute next test Test6(); }); @@ -253,8 +254,8 @@ function Test6() { checkResults(results[1], {server: {ALPN: 'b', NPN: false}, client: {ALPN: 'b', NPN: undefined}}); // nothing is selected by ALPN - checkResults(results[2], {server: {ALPN: false, NPN: false}, - client: {ALPN: false, NPN: undefined}}); + checkResults(results[2], {server: {ALPN: false, NPN: 'http/1.1'}, + client: {ALPN: false, NPN: false}}); // execute next test Test7(); });