Skip to content

Commit

Permalink
chore: set keepAliveTimeout to speed up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelly Selden committed Oct 22, 2019
1 parent 87bc0d3 commit 2637976
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions helpers/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ class Server {
this.server = app.listen(port, resolve);
});

// `close` takes 5 secs otherwise
// `0` makes it hang forever
// https://nodejs.org/api/http.html#http_server_keepalivetimeout
this.server.keepAliveTimeout = 1;

return port;
}

Expand Down

0 comments on commit 2637976

Please sign in to comment.