db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r1466225 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java
Date Tue, 09 Apr 2013 20:48:16 GMT
Author: mikem
Date: Tue Apr  9 20:48:16 2013
New Revision: 1466225

URL: http://svn.apache.org/r1466225
Log:
DERBY-6122 -  InterruptResilienceTest fails with: junit.framework.ComparisonFailure: Database
shutdown expected:<[08006]> but was:<[XBDA0]> 

The core problem that led to this assert was that an attempt by the
test to shutdown the database timed out with:
Caused by: java.sql.SQLException: Login timeout exceeded. 

The test had set a 10 second timeout assuming that was large enough such that
no timeout would be encountered, but failed a few times in public IBM lab 
nightly regression runs.  Raising the number to 1000.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java?rev=1466225&r1=1466224&r2=1466225&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java
Tue Apr  9 20:48:16 2013
@@ -135,8 +135,23 @@ public class InterruptResilienceTest ext
         thisConf = TestConfiguration.getCurrent();
         threadNo = 0;    // counter for multiple threads tests
 
-        // test that we recover from login timeouts
-        DriverManager.setLoginTimeout( 10 );
+        // DERBY-6122
+        //
+        // Set a big enough timeout such that no fixture in this test encounters
+        // a timeout.  The point is to force the Derby tests to exercise a new 
+        // block of code added to Driver20 to handle interrupts raised during 
+        // login attempts. As InterruptResilienceTest runs, interrupts are 
+        // supposed to happen--although it's hard to force the exact timing of 
+        // the interrupts. The login timeout added to this test is only 
+        // supposed to test the following case:
+        //
+        // 1) An interrupt occurs within the time limit set 
+        //    by DriverManager.setLoginTimeout()
+        //
+        // 2) The new code added to Driver20 fields the interrupt and continues
+        //    attempting to log in.
+        //
+        DriverManager.setLoginTimeout( 1000 );
         
         allDone = false; // flag for threads to terminate
     }



Mime
View raw message