db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r1466635 - in /db/derby/code/branches/10.10: ./ java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java
Date Wed, 10 Apr 2013 19:18:03 GMT
Author: mikem
Date: Wed Apr 10 19:18:02 2013
New Revision: 1466635

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

backported change #1466225 from trunk to 10.10 branch.

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/branches/10.10/   (props changed)
    db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java

Propchange: db/derby/code/branches/10.10/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1466225

Modified: db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java?rev=1466635&r1=1466634&r2=1466635&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java
(original)
+++ db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java
Wed Apr 10 19:18:02 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