RFR: 8331999: BasicDirectoryModel/LoaderThreadCount.java frequently fails on Windows in CI

Harshitha Onkar honkar at openjdk.org
Thu May 9 17:39:51 UTC 2024


On Thu, 9 May 2024 13:01:57 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

> The `javax/swing/plaf/basic/BasicDirectoryModel/LoaderThreadCount.java` test frequently fails on Windows in CI, which creates noise.
> 
> All of the failures on Windows look the same:
> 
> Number of snapshots: 20
> Number of snapshots where number of loader threads:
>   = 1: 19
>   = 2: 0
>   > 2: 1
> Exception in Test Runner: class java.lang.RuntimeException:
> Detected 1 snapshots with several loading threads
> java.lang.RuntimeException: Detected 1 snapshots with several loading threads
>         at LoaderThreadCount.runTest(LoaderThreadCount.java:168)
>         at LoaderThreadCount.wrapper(LoaderThreadCount.java:108)
>         at java.base/java.lang.Thread.run(Thread.java:1575)
> 
> 
> To remove these false failures, I'm introducing a *tolerance factor*: fail the test if the number of snapshots with more than 2 file loader threads is greater than half of the number of valid snapshots. In terms of code:
> 
> 
> count > loaderCount.size() / 2
> 
> 
> The test still fails without the fix for [JDK-8325179](https://bugs.openjdk.org/browse/JDK-8325179).

LGTM

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

Marked as reviewed by honkar (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19156#pullrequestreview-2048484210


More information about the client-libs-dev mailing list