From f90397aa103c34375e7bbc607fc24c765d05069d Mon Sep 17 00:00:00 2001 From: Szymon Marczak <36894700+szmarczak@users.noreply.github.com> Date: Fri, 10 Jul 2020 15:53:17 +0200 Subject: [PATCH] Improve the graceful close test --- test/agent.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/agent.js b/test/agent.js index b49add7..3b5756b 100644 --- a/test/agent.js +++ b/test/agent.js @@ -1219,6 +1219,11 @@ test('graceful close works', wrapper, async (t, server) => { newRequest.close(); firstRequest.close(); + await pEvent(firstRequest, 'close'); + + t.true(firstSession.closed); + t.true(firstSession[Agent.kGracefullyClosing]); + agent.destroy(); await secondServer.close();