From 3a9de42420133eb8feb14d8b5448e5c3c61e6078 Mon Sep 17 00:00:00 2001 From: Flavia Rainone Date: Mon, 23 Oct 2023 02:00:50 -0300 Subject: [PATCH] [UNDERTOW-2331] At RapidResetDDoSUnitTestCase, accept a smaller number of responses than expected as the result of race condition where client notices the connection is closed by server before processing responses and it marks reads as broken Relates to UNDERTOW-2328 Signed-off-by: Flavia Rainone --- .../io/undertow/protocols/http2/RapidResetDDoSUnitTestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/test/java/io/undertow/protocols/http2/RapidResetDDoSUnitTestCase.java b/core/src/test/java/io/undertow/protocols/http2/RapidResetDDoSUnitTestCase.java index 7b8f7b6674..e7374a7ee6 100644 --- a/core/src/test/java/io/undertow/protocols/http2/RapidResetDDoSUnitTestCase.java +++ b/core/src/test/java/io/undertow/protocols/http2/RapidResetDDoSUnitTestCase.java @@ -243,7 +243,7 @@ public void assertDoSRstFramesHandled(int totalNumberOfRequests, int rstStreamLi // server sent go away before processing and responding client frames, sometimes this happens, depends on the order of threads // being executed - if (responses.isEmpty()) { + if (responses.size() < totalNumberOfRequests) { Assert.assertTrue(errorExpected); Assert.assertNotNull(exception); Assert.assertTrue(exception instanceof ClosedChannelException);