Skip to content

Commit

Permalink
Always flush response body in AbstractBlobContainerRetriesTestCase#se…
Browse files Browse the repository at this point in the history
…ndIncompleteContent with JDK23 (elastic#115197)

Resolves elastic#115172
  • Loading branch information
pxsalehi authored Oct 21, 2024
1 parent f256752 commit 671458a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,9 @@ protected int sendIncompleteContent(HttpExchange exchange, byte[] bytes) throws
if (bytesToSend > 0) {
exchange.getResponseBody().write(bytes, rangeStart, bytesToSend);
}
if (randomBoolean()) {
if (randomBoolean() || Runtime.version().feature() >= 23) {
// For now in JDK23 we need to always flush. See https://bugs.openjdk.org/browse/JDK-8331847.
// TODO: remove the JDK version check once that issue is fixed
exchange.getResponseBody().flush();
}
return bytesToSend;
Expand Down

0 comments on commit 671458a

Please sign in to comment.