Author: dag Date: Thu Mar 24 16:21:13 2011 New Revision: 1085027 URL: http://svn.apache.org/viewvc?rev=1085027&view=rev Log: DERBY-5108 Intermittent failure in AutomaticIndexStatisticsTest.testShutdownWhileScanningThenDelete on Windows Follow-up patch DERBY-5108-2 which makes the join with the daemon retry in the case the thread gets interrupted, also note the fact in InterruptStatus to follow our new pattern for interrupt handling. Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java?rev=1085027&r1=1085026&r2=1085027&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java Thu Mar 24 16:21:13 2011 @@ -921,11 +921,15 @@ public class IndexStatisticsDaemonImpl // this outside of the synchronized block so that we don't deadlock // with the thread. if (threadToWaitFor != null) { - try { - threadToWaitFor.join(); - } catch (InterruptedException ie) { - // Never mind. The thread will die eventually. + while (true) { + try { + threadToWaitFor.join(); + break; + } catch (InterruptedException ie) { + InterruptStatus.setInterrupted(); + } } + } }