diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index 2906cc8da19..b6307d1ed00 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -737,7 +737,6 @@ com/sun/jdi/InvokeHangTest.java 8218463 linux-al # jdk_util java/util/zip/CloseInflaterDeflaterTest.java 8339216 linux-s390x -java/util/logging/LoggingDeadlock5.java 8354424 generic-all ############################################################################ diff --git a/test/jdk/java/util/logging/LoggingDeadlock5.java b/test/jdk/java/util/logging/LoggingDeadlock5.java index fc4639812b7..bff53d1924f 100644 --- a/test/jdk/java/util/logging/LoggingDeadlock5.java +++ b/test/jdk/java/util/logging/LoggingDeadlock5.java @@ -25,11 +25,14 @@ * @test * @bug 8349206 * @summary j.u.l.Handler classes create deadlock risk via synchronized publish() method. + * @library /test/lib * @modules java.base/sun.util.logging * java.logging * @run main/othervm LoggingDeadlock5 */ +import jdk.test.lib.Utils; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -115,7 +118,13 @@ public class LoggingDeadlock5 { } private static class DeadLocker { - private final static Duration JOIN_WAIT = Duration.ofMillis(500); + // Since this is used to self-test for an expected deadlock, it will + // delay the test by at least this duration (so being overly large is + // a potential issue). The deadlock is set up so it should occur almost + // immediately (if it occurs), but tests are run under very high loads + // in higher tiers, so it's necessary to be a bit pessimistic here. + private final static Duration JOIN_WAIT = + Duration.ofMillis(Utils.adjustTimeout(2000)); private final Semaphore readyToDeadlock = new Semaphore(0); private final Semaphore userLockIsHeld = new Semaphore(0);