From 9d2cf15312accb033a7951ef853d0fc1b120bd17 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat Date: Mon, 2 Oct 2017 23:22:30 -0700 Subject: [PATCH] test: http2 stored settings returned when present Refs: #14985 PR-URL: https://github.com/nodejs/node/pull/15751 Reviewed-By: Matteo Collina Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- test/parallel/test-http2-session-settings.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http2-session-settings.js b/test/parallel/test-http2-session-settings.js index 7f54bc2f02dcc8..4570d23ad38a15 100644 --- a/test/parallel/test-http2-session-settings.js +++ b/test/parallel/test-http2-session-settings.js @@ -23,8 +23,14 @@ function assertSettings(settings) { function onStream(stream, headers, flags) { - assertSettings(stream.session.localSettings); - assertSettings(stream.session.remoteSettings); + const localSettings = stream.session.localSettings; + const remoteSettings = stream.session.remoteSettings; + assertSettings(localSettings); + assertSettings(remoteSettings); + + // Test that stored settings are returned when called for second time + assert.strictEqual(stream.session.localSettings, localSettings); + assert.strictEqual(stream.session.remoteSettings, remoteSettings); stream.respond({ 'content-type': 'text/html',