diff options
author | Loïc Hoguin <[email protected]> | 2024-01-16 11:21:30 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2024-01-16 11:21:30 +0100 |
commit | 920adb9b8258bf60f167f7ef86d33e66e467fcd7 (patch) | |
tree | d244deb2e5682f5813d7475274faffd352c25d8d | |
parent | 308045fd67d0b37475f924e35a434a8642307cc2 (diff) | |
download | cowboy-920adb9b8258bf60f167f7ef86d33e66e467fcd7.tar.gz cowboy-920adb9b8258bf60f167f7ef86d33e66e467fcd7.tar.bz2 cowboy-920adb9b8258bf60f167f7ef86d33e66e467fcd7.zip |
Fix an intermittent test failure
-rw-r--r-- | test/http_SUITE.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/http_SUITE.erl b/test/http_SUITE.erl index 3088383..fb9f93b 100644 --- a/test/http_SUITE.erl +++ b/test/http_SUITE.erl @@ -511,7 +511,12 @@ request_timeout_skip_body_more(Config) -> %% Missing final \r\n on purpose. >>), %% Connection should be closed by the request_timeout after that. - {error, closed} = raw_recv(Client, 1, 1000) + %% We attempt to send a 408 response on a best effort basis so + %% that is accepted as well. + case raw_recv(Client, 13, 1000) of + {error, closed} -> ok; + {ok, <<"HTTP/1.1 408 ", _/bits>>} -> ok + end after cowboy:stop_listener(?FUNCTION_NAME) end. |