Skip to content

Commit bd49ada

Browse files
trivikrMylesBorins
authored andcommitted
test: http2 stored settings returned when present
Refs: #14985 PR-URL: #15751 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 6642f54 commit bd49ada

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/parallel/test-http2-session-settings.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ function assertSettings(settings) {
2323

2424
function onStream(stream, headers, flags) {
2525

26-
assertSettings(stream.session.localSettings);
27-
assertSettings(stream.session.remoteSettings);
26+
const localSettings = stream.session.localSettings;
27+
const remoteSettings = stream.session.remoteSettings;
28+
assertSettings(localSettings);
29+
assertSettings(remoteSettings);
30+
31+
// Test that stored settings are returned when called for second time
32+
assert.strictEqual(stream.session.localSettings, localSettings);
33+
assert.strictEqual(stream.session.remoteSettings, remoteSettings);
2834

2935
stream.respond({
3036
'content-type': 'text/html',

0 commit comments

Comments
 (0)