Skip to content

Commit

Permalink
Allow for a much longer sleep while waiting for the interrupt to arrive
Browse files Browse the repository at this point in the history
  • Loading branch information
plummercj committed Jul 19, 2024
1 parent c8a95a7 commit e931aa2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/jdk/com/sun/jdi/InterruptHangTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ public static void main(String[] args){
for (int ii = 0; ii < INTERRUPTS_EXPECTED; ii++) {
boolean wasInterrupted = false;
try {
// Give other thread a chance to interrupt
Thread.sleep(100);
// Give other thread a chance to interrupt. Normally only a very short
// sleep is needed, but we need to account for unexpected delays in
// the interrupt due to machine and network hiccups.
Thread.sleep(10*1000);
} catch (InterruptedException ee) {
answer++;
wasInterrupted = true;
Expand Down

0 comments on commit e931aa2

Please sign in to comment.