0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Explicitly close the socket in some tests for speed ups

The socket staying open meant that the graceful shut down
of the Cowboy listeners were waiting for the connections
to be closed gracefully (or a timeout). Closing explicitly
where it makes sense ensures we don't unnecessarily wait.

This commit removes a full minute in the run time of all
Cowboy test suites (minus examples).
This commit is contained in:
Loïc Hoguin 2023-12-18 18:11:10 +01:00
parent 2558ba65ad
commit 627a4508b5
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
5 changed files with 51 additions and 21 deletions

View file

@ -293,7 +293,7 @@ flow_after_body_fully_read(Config) ->
%% Receive a 200 response, sent after the second flow command,
%% confirming that the flow command was accepted.
{response, _, 200, _} = gun:await(ConnPid, Ref),
ok.
gun:close(ConnPid).
set_options_ignore_unknown(Config) ->
doc("Confirm that unknown options are ignored when using the set_options commands."),