Browse Source

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 <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
v9.x-staging
Trivikram Kamat 7 years ago
committed by Matteo Collina
parent
commit
d64e94ba5b
  1. 2
      test/parallel/test-http2-goaway-opaquedata.js

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

Loading…
Cancel
Save