Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 88952 invoked from network); 27 Jun 2009 13:19:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Jun 2009 13:19:54 -0000 Received: (qmail 95942 invoked by uid 500); 27 Jun 2009 13:20:04 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 95875 invoked by uid 500); 27 Jun 2009 13:20:04 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 95866 invoked by uid 99); 27 Jun 2009 13:20:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Jun 2009 13:20:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Jun 2009 13:20:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B96352388876; Sat, 27 Jun 2009 13:19:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r788968 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi: ResultSetMiscTest.java SetTransactionIsolationTest.java Date: Sat, 27 Jun 2009 13:19:39 -0000 To: derby-commits@db.apache.org From: kahatlen@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090627131939.B96352388876@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kahatlen Date: Sat Jun 27 13:19:39 2009 New Revision: 788968 URL: http://svn.apache.org/viewvc?rev=788968&view=rev Log: DERBY-4273: A lock could not be obtained within the time requested error in testBTreeForwardScan_fetchRows_resumeAfterWait_nonUnique_split Use DatabasePropertyTestSetup to set timeout in ResultSetMiscTest and SetTransactionIsolationTest, so that the values are reset before IndexSplitDeadlockTest starts. Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetTransactionIsolationTest.java Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java?rev=788968&r1=788967&r2=788968&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java Sat Jun 27 13:19:39 2009 @@ -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 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 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 @@ 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/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetTransactionIsolationTest.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetTransactionIsolationTest.java?rev=788968&r1=788967&r2=788968&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetTransactionIsolationTest.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SetTransactionIsolationTest.java Sat Jun 27 13:19:39 2009 @@ -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 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 @@ 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 @@ 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"); } };