aboutsummaryrefslogtreecommitdiffstats
path: root/test/sys_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-03-23 18:33:16 +0100
committerLoïc Hoguin <[email protected]>2018-03-23 18:33:16 +0100
commit4d5174632cc1feac541697b18e6fbbdd0eed021b (patch)
tree6262f9c1631130b1631892fe9f3d458a71de0684 /test/sys_SUITE.erl
parent21c9c669719b864f6cc091125bc766183b43bd87 (diff)
downloadcowboy-4d5174632cc1feac541697b18e6fbbdd0eed021b.tar.gz
cowboy-4d5174632cc1feac541697b18e6fbbdd0eed021b.tar.bz2
cowboy-4d5174632cc1feac541697b18e6fbbdd0eed021b.zip
Add initial support for system messages in cowboy_loop
Diffstat (limited to 'test/sys_SUITE.erl')
-rw-r--r--test/sys_SUITE.erl7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/sys_SUITE.erl b/test/sys_SUITE.erl
index 6a460bf..bb77ede 100644
--- a/test/sys_SUITE.erl
+++ b/test/sys_SUITE.erl
@@ -400,9 +400,8 @@ trap_exit_parent_exit_loop(Config) ->
Parent = do_get_remote_pid_tcp(Socket),
[{_, Pid, _, _}] = supervisor:which_children(Parent),
Pid ! {'EXIT', Parent, shutdown},
- %% We're getting a 500 because the process exited in an unexpected way
- %% from Cowboy's point of view.
- {ok, "HTTP/1.1 500 "} = gen_tcp:recv(Socket, 13, 1000),
+ %% 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),
ok.
@@ -483,7 +482,7 @@ trap_exit_other_exit_loop(Config) ->
timer:sleep(100),
Parent = do_get_remote_pid_tcp(Socket),
[{_, Pid, _, _}] = supervisor:which_children(Parent),
- Pid ! {'EXIT', Parent, shutdown},
+ Pid ! {'EXIT', self(), shutdown},
%% The process stays alive.
{ok, "HTTP/1.1 299 "} = gen_tcp:recv(Socket, 13, 1000),
true = is_process_alive(Pid),