RFR: 8310645: CancelledResponse.java does not use HTTP/2 when testing the HttpClient
Conor Cleary
ccleary at openjdk.org
Mon Jul 3 15:08:55 UTC 2023
On Mon, 3 Jul 2023 10:36:34 GMT, Conor Cleary <ccleary at openjdk.org> wrote:
>> There is a check that the cancelling BodyHandler sets the cancelled field which may be sufficient
>
> Could also just check that the returned a call to `getMessage()` returns a string that contains cancelled but its not a very nice solution
Update: can verify the subscription is properly cancelled by adding a reference to the BodySubscriber used to the CancellingHandler (client) in the test. When the test is done, all thats needed is a call to `SubscriptionWrapper.cancelled()` to verify that the connection ended correctly.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14625#discussion_r1251010770
More information about the net-dev
mailing list