aboutsummaryrefslogtreecommitdiffstats
path: root/test/stream_handler_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-10-04 11:57:29 +0200
committerLoïc Hoguin <[email protected]>2019-10-04 11:57:29 +0200
commit1a9e62ae2a3b4e39c10c87b5841b460ed81124a9 (patch)
tree85551da1e89de0ffd4bfb3c4cd683c3b1d228276 /test/stream_handler_SUITE.erl
parent28aee1f2720da122f83758b141c503f7bff18ffb (diff)
downloadcowboy-1a9e62ae2a3b4e39c10c87b5841b460ed81124a9.tar.gz
cowboy-1a9e62ae2a3b4e39c10c87b5841b460ed81124a9.tar.bz2
cowboy-1a9e62ae2a3b4e39c10c87b5841b460ed81124a9.zip
Improve some early_error tests
Diffstat (limited to 'test/stream_handler_SUITE.erl')
-rw-r--r--test/stream_handler_SUITE.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/stream_handler_SUITE.erl b/test/stream_handler_SUITE.erl
index 130447d..1d5bd27 100644
--- a/test/stream_handler_SUITE.erl
+++ b/test/stream_handler_SUITE.erl
@@ -98,6 +98,12 @@ crash_in_init(Config) ->
Pid = receive {Self, P, init, _, _, _} -> P after 1000 -> error(timeout) end,
%% Confirm terminate/3 is NOT called. We have no state to give to it.
receive {Self, Pid, terminate, _, _, _} -> error(terminate) after 1000 -> ok end,
+ %% Confirm early_error/5 is called in HTTP/1.1's case.
+ %% HTTP/2 does not send a response back so there is no early_error call.
+ case config(protocol, Config) of
+ http -> receive {Self, Pid, early_error, _, _, _, _, _} -> ok after 1000 -> error(timeout) end;
+ http2 -> ok
+ end,
%% Receive a 500 error response.
case gun:await(ConnPid, Ref) of
{response, fin, 500, _} -> ok;