RFR: 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
Mon Mar 27 20:14:11 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.

No failures after 50 test runs. Without the change the test failed 3 times in 10.

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

Commit messages:
 - Fix test

Changes: https://git.openjdk.org/jdk/pull/13194/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13194&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8304962
  Stats: 8 lines in 1 file changed: 0 ins; 2 del; 6 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