diff options
author | Loïc Hoguin <[email protected]> | 2019-01-06 12:08:47 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-01-06 12:08:47 +0100 |
commit | eee5a59bc1763fc2e1c8c6e7155939dd04d930b7 (patch) | |
tree | 018fa7aa6c0b0a042855f0893c6fb2b9c1d555bf /test | |
parent | 9fa3fa25a8cafd7f5dd74d1ebc84c2258b5374bc (diff) | |
download | gun-eee5a59bc1763fc2e1c8c6e7155939dd04d930b7.tar.gz gun-eee5a59bc1763fc2e1c8c6e7155939dd04d930b7.tar.bz2 gun-eee5a59bc1763fc2e1c8c6e7155939dd04d930b7.zip |
Don't output unrelated errors in successful tests
We need to close the Gun connection to avoid owner_gone errors.
Diffstat (limited to 'test')
-rw-r--r-- | test/gun_SUITE.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/gun_SUITE.erl b/test/gun_SUITE.erl index d580ed3..957d2df 100644 --- a/test/gun_SUITE.erl +++ b/test/gun_SUITE.erl @@ -165,7 +165,7 @@ info(_) -> {ok, Pid} = gun:open("localhost", Port), {ok, _} = gen_tcp:accept(ListenSocket, 5000), #{sock_ip := _, sock_port := _} = gun:info(Pid), - ok. + gun:close(Pid). keepalive_infinity(_) -> doc("Ensure infinity for keepalive is accepted by all protocols."), @@ -267,7 +267,7 @@ do_reply_to(Protocol) -> ReplyTo ! Ref, receive {response, _, _, _} -> - ok + gun:close(Pid) after 1000 -> error(timeout) end. @@ -357,7 +357,7 @@ transform_header_name(_) -> Lines = binary:split(Data, <<"\r\n">>, [global]), HostLines = [L || <<"HOST: ", _/bits>> = L <- Lines], 1 = length(HostLines), - ok. + gun:close(Pid). unix_socket_connect(_) -> case os:type() of @@ -392,7 +392,7 @@ do_unix_socket_connect() -> _ = gun:get(Pid, "/", [{<<"host">>, <<"localhost">>}]), receive {recv, _} -> - ok + gun:close(Pid) after 250 -> error(timeout) end. |