From 49513a3d1ae12395a748e8ea17bc3d4a0b0df518 Mon Sep 17 00:00:00 2001 From: Denys Otrishko Date: Mon, 23 Dec 2019 16:38:55 +0200 Subject: [PATCH] test: log errors in test-http2-propagate-session-destroy-code --- .../parallel/test-http2-propagate-session-destroy-code.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-http2-propagate-session-destroy-code.js b/test/parallel/test-http2-propagate-session-destroy-code.js index a23bcfd07c32f9..f9e1d535720801 100644 --- a/test/parallel/test-http2-propagate-session-destroy-code.js +++ b/test/parallel/test-http2-propagate-session-destroy-code.js @@ -15,16 +15,16 @@ server.on('error', common.mustNotCall()); server.on('session', (session) => { session.on('close', common.mustCall()); session.on('error', common.mustCall((err) => { - assert(errRegEx.test(err)); + assert.ok(errRegEx.test(err), `server session err: ${err}`); assert.strictEqual(session.closed, false); assert.strictEqual(session.destroyed, true); })); session.on('stream', common.mustCall((stream) => { stream.on('error', common.mustCall((err) => { + assert.ok(errRegEx.test(err), `server stream err: ${err}`); assert.strictEqual(session.closed, false); assert.strictEqual(session.destroyed, true); - assert(errRegEx.test(err)); assert.strictEqual(stream.rstCode, destroyCode); })); @@ -36,7 +36,7 @@ server.listen(0, common.mustCall(() => { const session = http2.connect(`http://localhost:${server.address().port}`); session.on('error', common.mustCall((err) => { - assert(errRegEx.test(err)); + assert.ok(errRegEx.test(err), `client session err: ${err}`); assert.strictEqual(session.closed, false); assert.strictEqual(session.destroyed, true); })); @@ -44,7 +44,7 @@ server.listen(0, common.mustCall(() => { const stream = session.request({ [http2.constants.HTTP2_HEADER_PATH]: '/' }); stream.on('error', common.mustCall((err) => { - assert(errRegEx.test(err)); + assert.ok(errRegEx.test(err), `client stream err: ${err}`); assert.strictEqual(stream.rstCode, destroyCode); }));