You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ka...@apache.org on 2010/06/28 10:58:55 UTC

svn commit: r958508 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/engine/LockInterruptTest.java

Author: kahatlen
Date: Mon Jun 28 08:58:55 2010
New Revision: 958508

URL: http://svn.apache.org/viewvc?rev=958508&view=rev
Log:
DERBY-4711: Hung thread after another thread is interrupted

Fixed instability in the test case.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/engine/LockInterruptTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/engine/LockInterruptTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/engine/LockInterruptTest.java?rev=958508&r1=958507&r2=958508&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/engine/LockInterruptTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/engine/LockInterruptTest.java Mon Jun 28 08:58:55 2010
@@ -81,8 +81,9 @@ public class LockInterruptTest extends B
         Thread.sleep(2000); // give t2 time to enter the wait queue
 
         // Now that the queue of waiters has been set up, interrupt the
-        // first thread.
+        // first thread and give the interrupt a little time to do its work.
         t1.interrupt();
+        Thread.sleep(1000);
 
         // Release the table lock to allow the waiters to proceed.
         commit();