aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/handlers/long_polling_sys_h.erl4
-rw-r--r--test/sys_SUITE.erl7
2 files changed, 5 insertions, 6 deletions
diff --git a/test/handlers/long_polling_sys_h.erl b/test/handlers/long_polling_sys_h.erl
index 7745d8c..8f85758 100644
--- a/test/handlers/long_polling_sys_h.erl
+++ b/test/handlers/long_polling_sys_h.erl
@@ -10,7 +10,7 @@
init(Req, _) ->
process_flag(trap_exit, true),
erlang:send_after(500, self(), timeout),
- {cowboy_loop, Req, undefined, hibernate}.
+ {cowboy_loop, Req, undefined}.
info(timeout, Req, State) ->
%% Send an unused status code to make sure there's no
@@ -19,5 +19,5 @@ info(timeout, Req, State) ->
info(_, Req, State) ->
{ok, Req, State}.
-terminate({crash, _, _}, _, _) ->
+terminate(_, _, _) ->
ok.
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),