From fabd618eef9a502eaad2d482f063f86bdd3f8d7e 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 53dff5b139..4fa27e0b3d 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',