From 8d8c05de19316ee4d53e55c24ef6b511984976e9 Mon Sep 17 00:00:00 2001 From: Denys Otrishko Date: Sat, 7 Dec 2019 18:22:52 +0200 Subject: [PATCH] http2: forward debug message in debugStreamObj PR-URL: https://github.com/nodejs/node/pull/30840 Reviewed-By: Anna Henningsen Reviewed-By: Yongsheng Zhang Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Ruben Bridgewater Reviewed-By: Minwoo Jung --- lib/internal/http2/core.js | 2 +- test/parallel/test-http2-debug.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index abd9412a757c2d..4a4ab28e3e4af6 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -153,7 +153,7 @@ function debugStream(id, sessionType, message, ...args) { } function debugStreamObj(stream, message, ...args) { - debugStream(stream[kID], stream[kSession][kType], ...args); + debugStream(stream[kID], stream[kSession][kType], message, ...args); } function debugSession(sessionType, message, ...args) { diff --git a/test/parallel/test-http2-debug.js b/test/parallel/test-http2-debug.js index ad86e76ab75771..ce1873234e76ec 100644 --- a/test/parallel/test-http2-debug.js +++ b/test/parallel/test-http2-debug.js @@ -18,6 +18,10 @@ assert(stderr.match(/Http2Session client \(\d+\) handling data frame for stream stderr); assert(stderr.match(/HttpStream \d+ \(\d+\) \[Http2Session client \(\d+\)\] reading starting/), stderr); +assert(stderr.match(/HttpStream \d+ \(\d+\) \[Http2Session client \(\d+\)\] closed with code 0/), + stderr); +assert(stderr.match(/HttpStream \d+ \(\d+\) \[Http2Session server \(\d+\)\] closed with code 0/), + stderr); assert(stderr.match(/HttpStream \d+ \(\d+\) \[Http2Session server \(\d+\)\] tearing down stream/), stderr); assert.strictEqual(stdout.trim(), '');