RFR: 8304962: sun/net/www/http/KeepAliveCache/B5045306.java: java.lang.RuntimeException: Failed: Initial Keep Alive Connection is not being reused [v2]
Daniel Jeliński
djelinski at openjdk.org
Tue Mar 28 07:11:19 UTC 2023
> 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.
Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:
Add a comment about closing the strean
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/13194/files
- new: https://git.openjdk.org/jdk/pull/13194/files/a8ebe81a..c201f8a1
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=13194&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=13194&range=00-01
Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/13194.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/13194/head:pull/13194
PR: https://git.openjdk.org/jdk/pull/13194
More information about the net-dev
mailing list