randomDelay in DrainDeadlockT and LoggingDeadlock do not randomly delay

XMLWordPrintable

    • b27
    • generic
    • generic
    • Verified

        ADDITIONAL SYSTEM INFORMATION :
        This seems to have existed at least back to Java 9.

        A DESCRIPTION OF THE PROBLEM :
        https://hg.openjdk.java.net/jdk/jdk15/file/0dabbdfd97e6/test/jdk/java/util/logging/DrainFindDeadlockTest.java#l69
        https://hg.openjdk.java.net/jdk/jdk15/file/0dabbdfd97e6/test/jdk/java/util/logging/LoggingDeadlock.java#l62

        `int runs = (int) Math.random() * 1000000;` is always zero, so the subsequent loop always executes zero times.


              Assignee:
              Daniel Fuchs
              Reporter:
              Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: