[jdk17u-dev] RFR: 8330814: Cleanups for KeepAliveCache tests

Christoph Langer clanger at openjdk.org
Tue Aug 27 12:41:12 UTC 2024


On Sat, 17 Aug 2024 02:44:39 GMT, Amos Shi <ashi at openjdk.org> wrote:

> Backport of [JDK-8330814](https://bugs.openjdk.org/browse/JDK-8330814)
> - This PR has two commits
> - `commit 1` is a `clean` git patch from original commit
> - `commit 2` is fixing the following compile error
>   - The fix is in line with https://github.com/openjdk/jdk17u-dev/commit/e96daf3b5ba1b341acbc3bf005746d0c9aacc803#diff-9aaf6eb570572e1a22b661c23e76f330d090280ef60e7390d0ab421d48a6558eR68 from @RealCLanger
> 
> 
> ----------System.err:(8/634)----------
> /Users/I048686/SAPDevelop/github.com/dev-8330814-17/test/jdk/sun/net/www/http/KeepAliveCache/B5045306.java:73: error: no suitable method found for create(InetSocketAddress,int,String,SimpleHttpTransactionHandler)
>             server = HttpServer.create(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0), 10, "/", new SimpleHttpTransactionHandler());
>                                ^
>     method HttpServer.create() is not applicable
>       (actual and formal argument lists differ in length)
>     method HttpServer.create(InetSocketAddress,int) is not applicable
>       (actual and formal argument lists differ in length)
> 1 error
> result: Failed. Compilation failed: Compilation failed
> 
> 
> Testing
> - Local: Test passed on `MacOS 14.6.1` on Apple M1 Max
>   - `B5045306.java`: Test results: passed: 1
>   - `B8291637.java`: Test results: passed: 1
>   - `B8293562.java`: Test results: passed: 1
>   - `KeepAliveProperty.java`: Test results: passed: 1
>   - `KeepAliveTimerThread.java`: Test results: passed: 1
> - Pipeline: All checks have passed
> - Testing Machine: SAP nightlies SUCCESSFUL on `2024-08-23`
>   - Automated jtreg test: `jtreg_jdk_tier2`, Started at `2024-08-23 19:44:34+01:00`
>   - sun/net/www/http/KeepAliveCache/B5045306.java: SUCCESSFUL GitHub 📊 - [20:10:08.445 -> 14,486 msec]
>   - sun/net/www/http/KeepAliveCache/B8291637.java: SUCCESSFUL GitHub 📊 - [20:10:08.455 -> 20,795 msec]
>   - sun/net/www/http/KeepAliveCache/B8293562.java: SUCCESSFUL GitHub 📊 - [20:10:09.152 -> 7,188 msec]
>   - sun/net/www/http/KeepAliveCache/KeepAliveProperty.java: SUCCESSFUL GitHub 📊 - [20:10:09.356 -> 13,344 msec]
>   - sun/net/www/http/KeepAliveCache/KeepAliveTimerThread.java: SUCCESSFUL GitHub 📊 - [20:10:09.722 -> 2,621 msec]

Looks good and similar to my intial attempt in #2790 which still had an issue in B5045306. This seems to be fixed in this PR through the change in line 73 of B5045306.java:

>          server = HttpServer.create(new InetSocketAddress(InetAddress.getLocalHost(), 0), 10);

to

>          server = HttpServer.create(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0), 10);

Otherwise looks the same and passes testing, so LGTM.

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

Marked as reviewed by clanger (Reviewer).

PR Review: https://git.openjdk.org/jdk17u-dev/pull/2813#pullrequestreview-2263220312


More information about the jdk-updates-dev mailing list