Integrated: 8304962: sun/net/www/http/KeepAliveCache/B5045306.java: java.lang.RuntimeException: Failed: Initial Keep Alive Connection is not being reused

Daniel Jeliński djelinski at openjdk.org
Tue Mar 28 09:00:44 UTC 2023


On Mon, 27 Mar 2023 19:38:01 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

> This PR fixes intermittent test failures.
> 
> The test was broken by 95ca94436d12974d98b1b999f9cc8408d64cbe3c, which changed the `/firstCall` handler to return chunked response (second parameter to `sendResponseHeaders` was `0`). The test verifies the behavior of KeepAliveStreamCleaner, which only works on responses containing `Content-Length` header, and sometimes fails on chunked streams.
> 
> ~~Additionally I removed the unnecessary byte-to-character-to-byte conversion introduced in the same commit.~~
> Fixed the test server output. The PrintWriter printed the result of `toString()` call on a byte array instead of sending the byte array contents.
> 
> No failures after 50 test runs. Without the change the test failed 3 times in 10.

This pull request has now been integrated.

Changeset: cddaf686
Author:    Daniel Jeliński <djelinski at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/cddaf686e16424e9543be50a48b1c02337e79cf1
Stats:     9 lines in 1 file changed: 1 ins; 2 del; 6 mod

8304962: sun/net/www/http/KeepAliveCache/B5045306.java: java.lang.RuntimeException: Failed: Initial Keep Alive Connection is not being reused

Reviewed-by: jpai

-------------

PR: https://git.openjdk.org/jdk/pull/13194


More information about the net-dev mailing list