Skip to content

Commit 14aedb5

Browse files
plummercjPaul Hohensee
authored andcommitted
8333391: Test com/sun/jdi/InterruptHangTest.java failed: Thread was never interrupted during sleep
Backport-of: ed64994
1 parent 9ed9510 commit 14aedb5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/jdk/com/sun/jdi/InterruptHangTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ public static void main(String[] args){
101101
for (int ii = 0; ii < INTERRUPTS_EXPECTED; ii++) {
102102
boolean wasInterrupted = false;
103103
try {
104-
// Give other thread a chance to interrupt
105-
Thread.sleep(100);
104+
// Give other thread a chance to interrupt. Normally only a very short
105+
// sleep is needed, but we need to account for unexpected delays in
106+
// the interrupt due to machine and network hiccups.
107+
Thread.sleep(10*1000);
106108
} catch (InterruptedException ee) {
107109
answer++;
108110
wasInterrupted = true;

0 commit comments

Comments
 (0)