RFR: 8376308: java/net/httpclient/CancelRequestTest.java fails intermittently with "Expected CancellationException not received" [v3]
Daniel Jeliński
djelinski at openjdk.org
Fri Jan 30 14:54:24 UTC 2026
On Fri, 30 Jan 2026 14:25:05 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> 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.
>
> Daniel Fuchs has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>
> - Merge branch 'master' into CancelRequestTest-Sem-8376308
> - Review feedback: IOExceptions are not unexpected
> - Review feedback
> - Copyright year + unused imports
> - 8376308: java/net/httpclient/CancelRequestTest.java fails intermittently with "Expected CancellationException not received"
Marked as reviewed by djelinski (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/29415#pullrequestreview-3728791028
More information about the net-dev
mailing list