8137289: java/util/logging/DrainFindDeadlockTest.java hangs

Removed timeout=10 from @run command line. added new debug traces.

Reviewed-by: chegar, mchung
This commit is contained in:
Daniel Fuchs 2015-09-30 11:17:32 +02:00
parent c192a9a960
commit 95b5f4d550

View File

@ -35,7 +35,7 @@ import java.util.Map;
* @summary check for deadlock between findLogger() and drainLoggerRefQueueBounded()
* @author jim.gish@oracle.com
* @build DrainFindDeadlockTest
* @run main/othervm/timeout=10 DrainFindDeadlockTest
* @run main/othervm DrainFindDeadlockTest
* @key randomness
*/
@ -109,10 +109,14 @@ public class DrainFindDeadlockTest {
public void run() {
System.out.println("Running " + Thread.currentThread().getName());
try {
for (int i=0; i < MAX_ITERATIONS; i++) {
logger = Logger.getLogger("DrainFindDeadlockTest"+i);
DrainFindDeadlockTest.randomDelay();
}
} finally {
System.out.println("Completed " + Thread.currentThread().getName());
}
}
}
@ -120,6 +124,7 @@ public class DrainFindDeadlockTest {
@Override
public void run() {
System.out.println("Running " + Thread.currentThread().getName());
try {
for (int i=0; i < MAX_ITERATIONS; i++) {
try {
mgr.readConfiguration();
@ -128,6 +133,9 @@ public class DrainFindDeadlockTest {
}
DrainFindDeadlockTest.randomDelay();
}
} finally {
System.out.println("Completed " + Thread.currentThread().getName());
}
}
}
@ -185,12 +193,16 @@ public class DrainFindDeadlockTest {
@Override
public void run() {
System.out.println("Running " + Thread.currentThread().getName());
try {
for (int i=0; i < MAX_ITERATIONS*2; i++) {
checkState(t1, t2);
try {
Thread.sleep(10);
} catch (InterruptedException ex) {
};
}
}
} finally {
System.out.println("Completed " + Thread.currentThread().getName());
}
}
}