From d64e94ba5bb13519d20b44d0353bc1439639e96b Mon Sep 17 00:00:00 2001 From: Trivikram Kamat Date: Sun, 15 Oct 2017 01:21:00 -0700 Subject: [PATCH] test: http2 emitGoAway post shutdown pre destroy This commit tests use case when emitGoAway is called when client is shutting down but is not destroyed. Refs: https://github.com/nodejs/node/issues/14985 PR-URL: https://github.com/nodejs/node/pull/16215 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Matteo Collina --- test/parallel/test-http2-goaway-opaquedata.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/parallel/test-http2-goaway-opaquedata.js b/test/parallel/test-http2-goaway-opaquedata.js index af1ce27dd4..d8895a82ed 100644 --- a/test/parallel/test-http2-goaway-opaquedata.js +++ b/test/parallel/test-http2-goaway-opaquedata.js @@ -29,6 +29,8 @@ server.listen(0, () => { assert.deepStrictEqual(code, 1); assert.deepStrictEqual(lastStreamID, 0); assert.deepStrictEqual(data, buf); + // Call shutdown() here so that emitGoaway calls destroy() + client.shutdown(); server.close(); })); const req = client.request({ ':path': '/' });