From eee5a59bc1763fc2e1c8c6e7155939dd04d930b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sun, 6 Jan 2019 12:08:47 +0100 Subject: Don't output unrelated errors in successful tests We need to close the Gun connection to avoid owner_gone errors. --- test/gun_SUITE.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') 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. -- cgit v1.2.3