Skip to content

Commit

Permalink
Improve the graceful close test
Browse files Browse the repository at this point in the history
  • Loading branch information
szmarczak committed Jul 10, 2020
1 parent 46774f9 commit f90397a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f90397a

Please # to comment.