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). ------------- Commit messages: - 8331999: BasicDirectoryModel/LoaderThreadCount.java frequently fails on Windows in CI Changes: https://git.openjdk.org/jdk/pull/19156/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19156&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331999 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19156.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19156/head:pull/19156 PR: https://git.openjdk.org/jdk/pull/19156