db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1067303 - in /db/derby/code/branches/10.4: ./ java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetTransactionIsolationTest.java
Date Fri, 04 Feb 2011 21:59:29 GMT
Author: mamta
Date: Fri Feb  4 21:59:29 2011
New Revision: 1067303

URL: http://svn.apache.org/viewvc?rev=1067303&view=rev
Log:
DERBY-4273: A lock could not be obtained within the time requested error in testBTreeForwardScan_fetchRows_resumeAfterWait_nonUnique_split

Merged fix from trunk (revision 788968). 


Modified:
    db/derby/code/branches/10.4/   (props changed)
    db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java
    db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetTransactionIsolationTest.java

Propchange: db/derby/code/branches/10.4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb  4 21:59:29 2011
@@ -1,3 +1,3 @@
 /db/derby/code/branches/10.5:814216,958230
 /db/derby/code/branches/10.6:1055601
-/db/derby/code/trunk:788436,793588,794303,796316,796372,797147,798347,798742,800523,803548,805696,809643,812669,816536,835286,882732,898635,915177,915733,917771,928065,934996,946794,954544,958163,958230,959550,980684,999119,1053724,1057542,1062096
+/db/derby/code/trunk:788436,788968,793588,794303,796316,796372,797147,798347,798742,800523,803548,805696,809643,812669,816536,835286,882732,898635,915177,915733,917771,928065,934996,946794,954544,958163,958230,959550,980684,999119,1053724,1057542,1062096

Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java?rev=1067303&r1=1067302&r2=1067303&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java
(original)
+++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java
Fri Feb  4 21:59:29 2011
@@ -21,7 +21,6 @@
 
 package org.apache.derbyTesting.functionTests.tests.jdbcapi;
 
-import java.sql.CallableStatement;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
@@ -35,6 +34,7 @@ import junit.framework.TestSuite;
 import org.apache.derbyTesting.functionTests.util.SecurityCheck;
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
+import org.apache.derbyTesting.junit.DatabasePropertyTestSetup;
 import org.apache.derbyTesting.junit.TestConfiguration;
 import org.apache.derbyTesting.junit.Utilities;
 
@@ -463,14 +463,6 @@ public class ResultSetMiscTest extends B
     public void testBug4810() throws SQLException {
         Connection con = getConnection();
 
-        CallableStatement cs = con
-                .prepareCall("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(?, ?)");
-        cs.setString(1, "derby.locks.deadlockTimeout");
-        cs.setString(2, "3");
-        cs.execute();
-        cs.setString(1, "derby.locks.waitTimeout");
-        cs.setString(2, "3");
-        cs.close();
         Statement stmt = con.createStatement();
         stmt.executeUpdate("create table bug4810(i int, b int)");
         stmt
@@ -768,7 +760,11 @@ public class ResultSetMiscTest extends B
         TestSuite suite = new TestSuite(name);
         suite.addTestSuite(ResultSetMiscTest.class);
 
-        return new CleanDatabaseTestSetup(suite) {
+        // Some test cases expect lock timeouts, so reduce the timeout to
+        // make the test go faster.
+        Test test = DatabasePropertyTestSetup.setLockTimeouts(suite, 1, 3);
+
+        return new CleanDatabaseTestSetup(test) {
             /**
              * Creates the table used in the test cases.
              * 

Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetTransactionIsolationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetTransactionIsolationTest.java?rev=1067303&r1=1067302&r2=1067303&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetTransactionIsolationTest.java
(original)
+++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetTransactionIsolationTest.java
Fri Feb  4 21:59:29 2011
@@ -22,7 +22,6 @@
  */
 package org.apache.derbyTesting.functionTests.tests.jdbcapi;
 
-import java.sql.CallableStatement;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
@@ -34,6 +33,7 @@ import junit.framework.TestSuite;
 
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
+import org.apache.derbyTesting.junit.DatabasePropertyTestSetup;
 import org.apache.derbyTesting.junit.RuntimeStatisticsParser;
 import org.apache.derbyTesting.junit.SQLUtilities;
 import org.apache.derbyTesting.junit.TestConfiguration;
@@ -222,7 +222,11 @@ public class SetTransactionIsolationTest
         TestSuite suite = new TestSuite(name);
         suite.addTestSuite(SetTransactionIsolationTest.class);
 
-        return new CleanDatabaseTestSetup(suite) {
+        // Some test cases expect lock timeouts, so reduce the timeout to
+        // make the test go faster.
+        Test test = DatabasePropertyTestSetup.setLockTimeouts(suite, 1, 3);
+
+        return new CleanDatabaseTestSetup(test) {
 
             /**
              * Create and populate table
@@ -268,15 +272,6 @@ public class SetTransactionIsolationTest
                 s.executeUpdate("INSERT INTO T1 VALUES(3,'Third Hello')");
 
                 s.executeUpdate("create table t3 (i integer)");
-                
-
-                CallableStatement cs = conn
-                        .prepareCall("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY (?, ?)");
-                cs.setString(1, "derby.locks.waitTimeout");
-                cs.setString(2, "3");
-                cs.execute();
-                cs.setString(1, "derby.locks.deadlockTimeout");
-                cs.setString(2, "3");
             }
 
         };



Mime
View raw message