test/serviceability/threads/TestFalseDeadLock.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/test/serviceability/threads/TestFalseDeadLock.java	Tue Oct 28 19:58:59 2014
--- new/test/serviceability/threads/TestFalseDeadLock.java	Tue Oct 28 19:58:59 2014

*** 1,7 **** --- 1,7 ---- /* ! * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 19,36 **** --- 19,38 ---- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ + import com.oracle.java.testlibrary.Utils; import java.lang.management.ManagementFactory; import java.lang.management.ThreadMXBean; import java.util.Random; /* * @test * @bug 8016304 * @summary Make sure no deadlock is reported for this program which has no deadlocks. + * @library /testlibrary * @run main/othervm TestFalseDeadLock */ /* * This test will not provoke the bug every time it is run since the bug is intermittent.
*** 63,73 **** --- 65,75 ---- } } public static class Test implements Runnable { public void run() { ! Random r = new Random(); ! Random r = Utils.getRandomInstance(); while (running) { try { synchronized (this) { wait(r.nextInt(1000) + 1); }

test/serviceability/threads/TestFalseDeadLock.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File