RFR: 8349813: Test behavior of limiting() on RS operators throwing exceptions

Daniel Fuchs dfuchs at openjdk.org
Tue Feb 11 12:18:10 UTC 2025


On Tue, 11 Feb 2025 10:09:53 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

> Add tests verifying the behavior of `limiting()` factory methods (introduced in JDK-8328919) of `HttpResponse` on misbehaving Reactive Streams operators that throw exceptions.

test/jdk/java/net/httpclient/ThrowingSubscribersAsLimiting.java line 63:

> 61:                         HttpResponse.BodyHandlers.ofLines(),
> 62:                         // A big enough capacity to allow a minimal response with basic headers and such
> 63:                         1024);

Look good to me. Will 1024 be enough? We do not want the capacity to be reached here, so we might as well use Integer.MAX_VALUE or Long.MAX_VALUE?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23559#discussion_r1950736514


More information about the net-dev mailing list