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 my...@apache.org on 2014/10/06 23:12:21 UTC
svn commit: r1629764 -
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/LockTableVtiTest.java
Author: myrnavl
Date: Mon Oct 6 21:12:21 2014
New Revision: 1629764
URL: http://svn.apache.org/r1629764
Log:
DERBY-1040; Run store locking tests with network server and investigate locking behaviour
Pushing LockTableVtiTest to run with both embedded and DerbyNetClient/Network Server
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/LockTableVtiTest.java
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/LockTableVtiTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/LockTableVtiTest.java?rev=1629764&r1=1629763&r2=1629764&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/LockTableVtiTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/LockTableVtiTest.java Mon Oct 6 21:12:21 2014
@@ -69,29 +69,23 @@ public class LockTableVtiTest extends Ba
// setting to 60, which is the default, for starters
properties.setProperty("derby.locks.waitTimeout", "60");
- Test suite = TestConfiguration.embeddedSuite (LockTableVtiTest.class);
+ Test suite = TestConfiguration.defaultSuite (LockTableVtiTest.class);
suite = new DatabasePropertyTestSetup(suite, properties, true);
- return new CleanDatabaseTestSetup(suite) {
- /**
- * Creates the schemas and table used in the test cases.
- *
- * @throws SQLException
- */
- protected void decorateSQL(Statement s) throws SQLException {
- Connection conn = getConnection();
- conn.setAutoCommit(false);
- s.executeUpdate("create table account " +
- "(a int primary key not null, b int)");
- s.executeUpdate("insert into account values (0,1)");
- s.executeUpdate("insert into account values (1,1)");
- s.executeUpdate("insert into account values (2,1)");
- conn.commit();
- }
- };
+ return new CleanDatabaseTestSetup(suite) ;
}
protected void setUp() throws Exception {
super.setUp();
+ Connection conn = getConnection();
+ conn.setAutoCommit(false);
+ Statement s = createStatement();
+ s.executeUpdate("create table account " +
+ "(a int primary key not null, b int)");
+ s.executeUpdate("insert into account values (0,1)");
+ s.executeUpdate("insert into account values (1,1)");
+ s.executeUpdate("insert into account values (2,1)");
+ s.close();
+ conn.commit();
}
/**