From 0c6f7889bb05b8e9685bbf613b18b4e147ead6bb 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 --- 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 53dff5b13926e3..4fa27e0b3d6d69 100644 --- a/test/parallel/test-http2-session-settings.js +++ b/test/parallel/test-http2-session-settings.js @@ -22,8 +22,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',