RFR: 8304927: Update java/net/httpclient/BasicAuthTest.java to check basic auth over HTTP/2
Jaikiran Pai
jpai at openjdk.org
Tue Mar 28 07:06:29 UTC 2023
On Mon, 27 Mar 2023 09:51:54 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
> The BasicAuthTest only tests basic authentication with clear HTTP/1.1.
> This changes upgrades it to also test against TLS, as well as HTTP/2.
> The bulk of the fix is to move the implementation of a HttpBasicAuthFilter from DigestEchoServer.java to HttpServerAdapters. This makes it possible to enable basic auth in the HTTP/2 test server.
Looks good to me.
test/jdk/java/net/httpclient/BasicAuthTest.java line 115:
> 113:
> 114: if (!ok || ca.count != 1)
> 115: throw new RuntimeException("Test failed");
Hello Daniel, while we are changing this test, do you think we should also update this exception message, here and other places where we throw this, to also include the `ca.count` in the exception message to help debug any potential failures?
-------------
Marked as reviewed by jpai (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13189#pullrequestreview-1360339247
PR Review Comment: https://git.openjdk.org/jdk/pull/13189#discussion_r1150117139
More information about the net-dev
mailing list