Skip to content

Commit

Permalink
test: add tests for quic idleTimeout
Browse files Browse the repository at this point in the history
It would be better to add a test to ensure that the timeout is
greater than the triple PTO if we can get the PTO.

PR-URL: nodejs#160
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
oyyd authored and juanarbol committed Dec 17, 2019
1 parent f29029b commit f756876
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/parallel/test-quic-idle-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,10 @@ const idleTimeout = common.platformTimeout(1000);
idleTimeout,
});

server.on('session', common.mustCall((serverSession) => {
serverSession.on('close', common.mustCall(() => {
client.close();
server.close();
assert(Date.now() - start < idleTimeout + error);
}));
server.on('session', common.mustCall(() => {
client.close();
server.close();
assert(Date.now() - start < idleTimeout + error);
}));

server.on('ready', common.mustCall(() => {
Expand Down

0 comments on commit f756876

Please sign in to comment.