aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-10-28 17:11:52 +0100
committerLoïc Hoguin <[email protected]>2018-10-28 17:11:52 +0100
commita002df4560367e101ebc562a15571e74c92509e8 (patch)
treeb41bf2b920fbe51c77626f14a6d04aa1fca2df52
parente11279e0d2c885101ac3f978be0d38cf7e43ca2d (diff)
downloadcowboy-a002df4560367e101ebc562a15571e74c92509e8.tar.gz
cowboy-a002df4560367e101ebc562a15571e74c92509e8.tar.bz2
cowboy-a002df4560367e101ebc562a15571e74c92509e8.zip
Fix the sys trap_exit tests
The processes go down slower now so that caused intermittent issues.
-rw-r--r--test/sys_SUITE.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/sys_SUITE.erl b/test/sys_SUITE.erl
index a9880a6..6909f60 100644
--- a/test/sys_SUITE.erl
+++ b/test/sys_SUITE.erl
@@ -21,6 +21,7 @@
-import(ct_helper, [get_parent_pid/1]).
-import(ct_helper, [get_remote_pid_tcp/1]).
-import(ct_helper, [get_remote_pid_tls/1]).
+-import(ct_helper, [is_process_down/1]).
-import(cowboy_test, [gun_open/1]).
all() ->
@@ -319,7 +320,7 @@ trap_exit_parent_exit_h1(Config) ->
Parent = get_parent_pid(Pid),
Pid ! {'EXIT', Parent, shutdown},
{error, closed} = gen_tcp:recv(Socket, 0, 1000),
- false = is_process_alive(Pid),
+ true = is_process_down(Pid),
ok.
trap_exit_parent_exit_h2(Config) ->
@@ -334,7 +335,7 @@ trap_exit_parent_exit_h2(Config) ->
Parent = get_parent_pid(Pid),
Pid ! {'EXIT', Parent, shutdown},
{error, closed} = ssl:recv(Socket, 0, 1000),
- false = is_process_alive(Pid),
+ true = is_process_down(Pid),
ok.
trap_exit_parent_exit_ws(Config) ->
@@ -358,7 +359,7 @@ trap_exit_parent_exit_ws(Config) ->
Parent = get_parent_pid(Pid),
Pid ! {'EXIT', Parent, shutdown},
{error, closed} = gen_tcp:recv(Socket, 0, 1000),
- false = is_process_alive(Pid),
+ true = is_process_down(Pid),
ok.
trap_exit_parent_exit_loop(Config) ->
@@ -375,7 +376,7 @@ trap_exit_parent_exit_loop(Config) ->
Pid ! {'EXIT', Parent, shutdown},
%% We exit normally but didn't send a response.
{ok, "HTTP/1.1 204 "} = gen_tcp:recv(Socket, 13, 1000),
- false = is_process_alive(Pid),
+ true = is_process_down(Pid),
ok.
trap_exit_other_exit_h1(Config) ->