RFR: 8376308: java/net/httpclient/CancelRequestTest.java fails intermittently with "Expected CancellationException not received"
Daniel Fuchs
dfuchs at openjdk.org
Mon Jan 26 13:18:54 UTC 2026
When using async mode, and if the "wrong" test/client thread gets suspended at the wrong time there's a small time window in which the server might be able to send its reply before the request is cancelled.
This can be avoided by having the server handler wait on a semaphore until the cancellation exception has been propagated to the caller on the client side.
-------------
Commit messages:
- Copyright year + unused imports
- 8376308: java/net/httpclient/CancelRequestTest.java fails intermittently with "Expected CancellationException not received"
Changes: https://git.openjdk.org/jdk/pull/29415/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29415&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8376308
Stats: 96 lines in 1 file changed: 53 ins; 1 del; 42 mod
Patch: https://git.openjdk.org/jdk/pull/29415.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29415/head:pull/29415
PR: https://git.openjdk.org/jdk/pull/29415
More information about the net-dev
mailing list