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': '/' });