diff options
author | Loïc Hoguin <[email protected]> | 2019-10-02 10:10:43 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-10-02 10:10:43 +0200 |
commit | e1d452411873cc11530f5e01d30b5f27e38a9423 (patch) | |
tree | 095c54120bb2ed30a228f748a4922b0944d6c00b | |
parent | 6ddabc2c21498e66ad94a78f1839197c4090e704 (diff) | |
download | cowboy-e1d452411873cc11530f5e01d30b5f27e38a9423.tar.gz cowboy-e1d452411873cc11530f5e01d30b5f27e38a9423.tar.bz2 cowboy-e1d452411873cc11530f5e01d30b5f27e38a9423.zip |
Update gun_down messages in test suites
-rw-r--r-- | test/cowboy_test.erl | 2 | ||||
-rw-r--r-- | test/req_SUITE.erl | 2 | ||||
-rw-r--r-- | test/rfc7231_SUITE.erl | 2 | ||||
-rw-r--r-- | test/ws_handler_SUITE.erl | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/test/cowboy_test.erl b/test/cowboy_test.erl index 1591a5f..ffdc238 100644 --- a/test/cowboy_test.erl +++ b/test/cowboy_test.erl @@ -117,7 +117,7 @@ gun_open(Config, Opts) -> ConnPid. gun_down(ConnPid) -> - receive {gun_down, ConnPid, _, _, _, _} -> ok + receive {gun_down, ConnPid, _, _, _} -> ok after 500 -> error(timeout) end. %% Support functions for testing using a raw socket. diff --git a/test/req_SUITE.erl b/test/req_SUITE.erl index cb54167..eafabfe 100644 --- a/test/req_SUITE.erl +++ b/test/req_SUITE.erl @@ -962,7 +962,7 @@ stream_body_content_length_nofin_error(Config) -> %% The server closes the connection when the body couldn't be sent fully. {error, {stream_error, closed}} -> receive - {gun_down, ConnPid, _, _, _, _} -> + {gun_down, ConnPid, _, _, _} -> gun:close(ConnPid) after 1000 -> error(timeout) diff --git a/test/rfc7231_SUITE.erl b/test/rfc7231_SUITE.erl index 1b8776e..6c74391 100644 --- a/test/rfc7231_SUITE.erl +++ b/test/rfc7231_SUITE.erl @@ -325,7 +325,7 @@ do_expect_discard_body_close(Config) -> {ok, <<"POST">>} = gun:await_body(ConnPid, Ref1), %% The connection is gone. receive - {gun_down, ConnPid, _, closed, _, _} -> + {gun_down, ConnPid, _, closed, _} -> ok after 1000 -> error(timeout) diff --git a/test/ws_handler_SUITE.erl b/test/ws_handler_SUITE.erl index 8c45dc7..67d50d2 100644 --- a/test/ws_handler_SUITE.erl +++ b/test/ws_handler_SUITE.erl @@ -281,7 +281,7 @@ websocket_set_options_idle_timeout(Config) -> %% the connection gets closed soon after. gun:ws_send(ConnPid, {text, <<"idle_timeout_short">>}), receive - {gun_down, ConnPid, _, _, _, _} -> + {gun_down, ConnPid, _, _, _} -> ok after 2000 -> error(timeout) |