aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-11-29 17:17:10 +0100
committerLoïc Hoguin <[email protected]>2017-11-29 17:17:22 +0100
commitbd6c32d3b7af8bfd8c4887b1c8711c615c51ee19 (patch)
treee3a421d4a44d0c848c0544644d1dc27fc1ee692b
parent1066a8d3763c75a1d63ef347e0caa4971c1aa494 (diff)
downloadcowboy-bd6c32d3b7af8bfd8c4887b1c8711c615c51ee19.tar.gz
cowboy-bd6c32d3b7af8bfd8c4887b1c8711c615c51ee19.tar.bz2
cowboy-bd6c32d3b7af8bfd8c4887b1c8711c615c51ee19.zip
Fix an intermittent test failure in the rfc7540 suite
-rw-r--r--test/rfc7540_SUITE.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/rfc7540_SUITE.erl b/test/rfc7540_SUITE.erl
index 7404f8b..c4c85a0 100644
--- a/test/rfc7540_SUITE.erl
+++ b/test/rfc7540_SUITE.erl
@@ -1243,7 +1243,14 @@ max_frame_size_allow_exactly_default(Config) ->
cow_http2:data(1, fin, << 0:16384/unit:8 >>)
]),
%% Receive a response with the same DATA frame.
- {ok, << SkipLen:24, 1:8, _:8, 1:32 >>} = gen_tcp:recv(Socket, 9, 1000),
+ {ok, << SkipLen:24, 1:8, _:8, 1:32 >>} = case gen_tcp:recv(Socket, 9, 1000) of
+ %% We received a WINDOW_UPDATE first. Skip it and the next.
+ {ok, <<4:24, 8:8, 0:40>>} ->
+ {ok, _} = gen_tcp:recv(Socket, 4 + 13, 1000),
+ gen_tcp:recv(Socket, 9, 1000);
+ Res ->
+ Res
+ end,
{ok, _} = gen_tcp:recv(Socket, SkipLen, 1000),
{ok, << 16384:24, 0:8, 1:8, 1:32 >>} = gen_tcp:recv(Socket, 9, 1000),
{ok, << 0:16384/unit:8 >>} = gen_tcp:recv(Socket, 16384, 1000),