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);