From 12eae6ef6ce51a7354c13cae0e11bf0f63aa1078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 11 Aug 2017 16:52:03 +0200 Subject: Fix tests --- test/gun_SUITE.erl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/gun_SUITE.erl b/test/gun_SUITE.erl index b9706a0..dbd51b5 100644 --- a/test/gun_SUITE.erl +++ b/test/gun_SUITE.erl @@ -25,7 +25,7 @@ connect_timeout(_) -> {ok, Pid} = gun:open("localhost", 12345, #{connect_timeout => 1000, retry => 0}), Ref = monitor(process, Pid), receive - {'DOWN', Ref, process, Pid, {gone, _}} -> + {'DOWN', Ref, process, Pid, {{gone, _}, _}} -> ok after 5000 -> error(timeout) @@ -36,7 +36,7 @@ connect_timeout_infinity(_) -> {ok, Pid} = gun:open("localhost", 12345, #{connect_timeout => infinity, retry => 0}), Ref = monitor(process, Pid), receive - {'DOWN', Ref, process, Pid, {gone, _}} -> + {'DOWN', Ref, process, Pid, {{gone, _}, _}} -> ok after 5000 -> error(timeout) @@ -57,7 +57,7 @@ detect_owner_gone(_) -> end, Ref = monitor(process, Pid), receive - {'DOWN', Ref, process, Pid, {owner_gone, _}} -> + {'DOWN', Ref, process, Pid, {{owner_gone, _}, _}} -> ok after 1000 -> true = erlang:is_process_alive(Pid), @@ -69,7 +69,7 @@ gone_reason(_) -> {ok, Pid} = gun:open("localhost", 12345, #{retry => 0}), Ref = monitor(process, Pid), receive - {'DOWN', Ref, process, Pid, {gone, econnrefused}} -> + {'DOWN', Ref, process, Pid, {{gone, econnrefused}, _}} -> ok after 200 -> error(timeout) @@ -112,7 +112,7 @@ retry_0(_) -> {ok, Pid} = gun:open("localhost", 12345, #{retry => 0, retry_timeout => 500}), Ref = monitor(process, Pid), receive - {'DOWN', Ref, process, Pid, {gone, _}} -> + {'DOWN', Ref, process, Pid, {{gone, _}, _}} -> ok after 200 -> error(timeout) @@ -123,7 +123,7 @@ retry_1(_) -> {ok, Pid} = gun:open("localhost", 12345, #{retry => 1, retry_timeout => 500}), Ref = monitor(process, Pid), receive - {'DOWN', Ref, process, Pid, {gone, _}} -> + {'DOWN', Ref, process, Pid, {{gone, _}, _}} -> ok after 700 -> error(timeout) @@ -134,13 +134,13 @@ retry_timeout(_) -> {ok, Pid} = gun:open("localhost", 12345, #{retry => 1, retry_timeout => 1000}), Ref = monitor(process, Pid), receive - {'DOWN', Ref, process, Pid, {gone, _}} -> + {'DOWN', Ref, process, Pid, {{gone, _}, _}} -> error(gone_too_early) after 800 -> ok end, receive - {'DOWN', Ref, process, Pid, {gone, _}} -> + {'DOWN', Ref, process, Pid, {{gone, _}, _}} -> ok after 400 -> error(gone_too_late) -- cgit v1.2.3