Skip to content

Commit

Permalink
test timing
Browse files Browse the repository at this point in the history
  • Loading branch information
hueniverse committed Sep 15, 2019
1 parent e7d31dd commit b5e2b38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,11 +831,11 @@ describe('Core', () => {
const count1 = await internals.countConnections(server);
expect(count1).to.equal(1);

setTimeout(() => socket.end(), 50);
setTimeout(() => socket.end(), 100);

const timer = new Hoek.Bench();
await server.stop({ timeout: 200 });
expect(timer.elapsed()).to.be.below(150);
await server.stop({ timeout: 400 });
expect(timer.elapsed()).to.be.below(300);
});

it('immediately destroys idle keep-alive connections', async () => {
Expand Down

0 comments on commit b5e2b38

Please sign in to comment.