From 920adb9b8258bf60f167f7ef86d33e66e467fcd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 16 Jan 2024 11:21:30 +0100 Subject: [PATCH] Fix an intermittent test failure --- test/http_SUITE.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/http_SUITE.erl b/test/http_SUITE.erl index 30883837..fb9f93b3 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.