Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8331999

BasicDirectoryModel/LoaderThreadCount.java frequently fails on Windows in CI

    XMLWordPrintable

Details

    • 23
    • b23
    • x86_64, aarch64
    • windows

    Backports

      Description

        After JDK-8331142 was integrated, the test/jdk/javax/swing/plaf/basic/BasicDirectoryModel/LoaderThreadCount.java test frequently fails on Windows in CI.

        All the failures found 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)


        A kind of tolerance is needed. For example, fail the test if the number of snapshots with more than 2 loading threads is above 2 or 3. Without the fix, the number of such snapshots is much higher, usually at 20 out of 20, the lowest I've seen over the recent days is 16.

        A fraction of the number of (valid) snapshots could be used, for instance SNAPSHOTS / 2 or loaderCount.size() / 2, both usually give 10 on Windows.

        Attachments

          Issue Links

            Activity

              People

                aivanov Alexey Ivanov
                aivanov Alexey Ivanov
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: