Skip to content

Commit 2f93690

Browse files
pxsalehijfreden
authored andcommitted
Always flush response body in AbstractBlobContainerRetriesTestCase#sendIncompleteContent with JDK23 (elastic#115197)
Resolves elastic#115172
1 parent 75f0660 commit 2f93690

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/framework/src/main/java/org/elasticsearch/repositories/blobstore/AbstractBlobContainerRetriesTestCase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,9 @@ protected int sendIncompleteContent(HttpExchange exchange, byte[] bytes) throws
418418
if (bytesToSend > 0) {
419419
exchange.getResponseBody().write(bytes, rangeStart, bytesToSend);
420420
}
421-
if (randomBoolean()) {
421+
if (randomBoolean() || Runtime.version().feature() >= 23) {
422+
// For now in JDK23 we need to always flush. See https://bugs.openjdk.org/browse/JDK-8331847.
423+
// TODO: remove the JDK version check once that issue is fixed
422424
exchange.getResponseBody().flush();
423425
}
424426
return bytesToSend;

0 commit comments

Comments
 (0)