Skip to content

Commit

Permalink
Fix an intermittent test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
essen committed Jan 16, 2024
1 parent 308045f commit 920adb9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/http_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 920adb9

Please sign in to comment.