RFR: 8365811: test/jdk/java/net/CookieHandler/B6644726.java failure - "Should have 5 cookies. Got only 4, expires probably didn't parse correctly"

SendaoYan syan at openjdk.org
Wed Aug 20 02:19:35 UTC 2025


On Tue, 19 Aug 2025 16:53:45 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Can I please get a review of this trivial test-only fix which addresses the failure in `test/jdk/java/net/CookieHandler/B6644726.java`? This addresses https://bugs.openjdk.org/browse/JDK-8365811.
> 
> The test verifies the behaviour of cookie parsing through the `java.net.CookieStore` API. For that it uses a couple of cookies which have an expiry date set to August 19th 2025 (which is today). The assertions in this test start failing once those 2 cookies expire (which is today).
> 
> The fix in this PR updates the cookie expiry year to a date very far in future to prevent such failures.

This fix works for me.

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

Marked as reviewed by syan (Committer).

PR Review: https://git.openjdk.org/jdk/pull/26846#pullrequestreview-3134564558


More information about the net-dev mailing list