On Thu, 9 May 2024 13:01:57 GMT, Alexey Ivanov <aiva...@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).

Marked as reviewed by prr (Reviewer).

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

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

Reply via email to