From 14aedb575c022b90393e56c5de0d048b5e58a17e Mon Sep 17 00:00:00 2001 From: Chris Plummer Date: Fri, 18 Oct 2024 11:32:11 +0000 Subject: [PATCH] 8333391: Test com/sun/jdi/InterruptHangTest.java failed: Thread was never interrupted during sleep Backport-of: ed6499446dadc339599271a282ceca4a52dbeed4 --- test/jdk/com/sun/jdi/InterruptHangTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/jdk/com/sun/jdi/InterruptHangTest.java b/test/jdk/com/sun/jdi/InterruptHangTest.java index a8062586d27..5dcb5efef31 100644 --- a/test/jdk/com/sun/jdi/InterruptHangTest.java +++ b/test/jdk/com/sun/jdi/InterruptHangTest.java @@ -101,8 +101,10 @@ class InterruptHangTarg { 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;