From 3511fed270828c06df70b4ab1b9acfdef321e607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20S=C3=B6derqvist?= Date: Wed, 8 Nov 2023 20:50:31 +0100 Subject: [PATCH] Minor simplification of testcase --- test/security_SUITE.erl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/security_SUITE.erl b/test/security_SUITE.erl index e048ceab..5479c341 100644 --- a/test/security_SUITE.erl +++ b/test/security_SUITE.erl @@ -259,12 +259,9 @@ http2_cancel_flood_helper(Config, NumStreamsPerBatch, NumBatches) -> AllStreamIDs, lists:seq(1, NumBatches, 1)), %% When Cowboy detects a flood it must close the connection. - case gen_tcp:recv(Socket, 9, 6000) of - {ok, <<_:24, 7:8, 0:8, 0:32>>} -> + case gen_tcp:recv(Socket, 17, 6000) of + {ok, <<_:24, 7:8, 0:8, 0:32, _LastStreamId:32, 11:32>>} -> %% GOAWAY with error code 11 = enhance your calm - {ok, <<_LastStreamId:32, ErrorCode:32>>} = - gen_tcp:recv(Socket, 8, 1000), - 11 = ErrorCode, %% ENHANCE_YOUR_CALM ok; %% We also accept the connection being closed immediately, %% which may happen because we send the GOAWAY right before closing.