提交 2a2a7b13 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Remove TestAll.mvcc

上级 a9f52ea6
......@@ -308,11 +308,6 @@ java org.h2.test.TestAll timer
*/
public boolean codeCoverage;
/**
* If the multi version concurrency control mode should be used.
*/
public boolean mvcc = mvStore;
/**
* If the multi-threaded mode should be used.
*/
......@@ -644,12 +639,10 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
memory = false;
multiThreaded = false;
mvStore = false;
mvcc = false;
test();
testUnit();
mvStore = true;
mvcc = true;
memory = true;
multiThreaded = false;
networked = true;
......@@ -713,7 +706,6 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
multiThreaded = false;
mvStore = false;
mvcc = false;
test();
// testUnit();
}
......@@ -1130,7 +1122,6 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
appendIf(buff, networked, "net");
appendIf(buff, memory, "memory");
appendIf(buff, codeCoverage, "codeCoverage");
appendIf(buff, mvcc, "mvcc");
appendIf(buff, multiThreaded, "multiThreaded");
appendIf(buff, cipher != null, cipher);
appendIf(buff, cacheType != null, cacheType);
......
......@@ -314,9 +314,6 @@ public abstract class TestBase {
// force operations to disk
url = addOption(url, "MAX_OPERATION_MEMORY", "1");
}
if (config.mvcc) {
url = addOption(url, "MVCC", "TRUE");
}
url = addOption(url, "MULTI_THREADED", config.multiThreaded ? "TRUE" : "FALSE");
if (config.lazy) {
url = addOption(url, "LAZY_QUERY_EXECUTION", "1");
......
......@@ -235,7 +235,7 @@ public class TestDeadlock extends TestBase {
}
private void testThreePhilosophers() throws Exception {
if (config.mvcc || config.mvStore) {
if (config.mvStore) {
return;
}
initTest();
......@@ -281,7 +281,7 @@ public class TestDeadlock extends TestBase {
// test case for issue # 61
// http://code.google.com/p/h2database/issues/detail?id=61)
private void testThreeSome() throws Exception {
if (config.mvcc || config.mvStore) {
if (config.mvStore) {
return;
}
initTest();
......@@ -326,7 +326,7 @@ public class TestDeadlock extends TestBase {
}
private void testLockUpgrade() throws Exception {
if (config.mvcc || config.mvStore) {
if (config.mvStore) {
return;
}
initTest();
......@@ -360,7 +360,7 @@ public class TestDeadlock extends TestBase {
}
private void testDiningPhilosophers() throws Exception {
if (config.mvcc || config.mvStore) {
if (config.mvStore) {
return;
}
initTest();
......
......@@ -534,7 +534,6 @@ public class TestGeneralCommonTableQueries extends AbstractBaseForCommonTableExp
config.lazy = true;
config.mvStore = true;
config.memory = true;
config.mvcc = true;
config.multiThreaded = true;
String setupSQL = "--no config set";
......
......@@ -28,7 +28,7 @@ public class TestLargeBlob extends TestBase {
@Override
public void test() throws Exception {
if (!config.big || config.memory || config.mvcc || config.networked) {
if (!config.big || config.memory || config.mvStore || config.networked) {
return;
}
......
......@@ -693,10 +693,7 @@ public class TestLinkedTable extends TestBase {
}
private void testGeometry() throws SQLException {
if (!config.mvStore && config.mvcc) {
return;
}
if (config.memory && config.mvcc) {
if (config.memory && config.mvStore) {
return;
}
if (DataType.GEOMETRY_CLASS == null) {
......
......@@ -510,7 +510,7 @@ public class TestLob extends TestBase {
}
private void testDeadlock2() throws Exception {
if (config.mvcc || config.memory) {
if (config.mvStore || config.memory) {
return;
}
deleteDb("lob");
......
......@@ -142,7 +142,7 @@ public class TestMultiThread extends TestBase implements Runnable {
}
private void testConcurrentView() throws Exception {
if (config.mvcc || config.mvStore) {
if (config.mvStore) {
return;
}
String db = getTestName();
......@@ -206,7 +206,7 @@ public class TestMultiThread extends TestBase implements Runnable {
}
private void testConcurrentAnalyze() throws Exception {
if (config.mvcc) {
if (config.mvStore) {
return;
}
deleteDb(getTestName());
......
......@@ -43,9 +43,6 @@ public class TestMultiThreadedKernel extends TestBase {
@Override
public void test() throws Exception {
if (config.mvcc) {
return;
}
if (config.mvStore) { // FIXME can't see why test should not work in MVStore mode
return;
}
......
......@@ -659,7 +659,7 @@ public class TestOptimizations extends TestBase {
ResultSet rs = stat.executeQuery(
"explain select min(x), max(x) from test");
rs.next();
if (!config.mvcc) {
if (!config.mvStore) {
String plan = rs.getString(1);
assertContains(plan, "direct");
}
......
......@@ -31,7 +31,7 @@ public class TestSessionsLocks extends TestBase {
return;
}
testCancelStatement();
if (!config.mvcc) {
if (!config.mvStore) {
testLocks();
}
deleteDb("sessionsLocks");
......@@ -56,7 +56,7 @@ public class TestSessionsLocks extends TestBase {
assertEquals("PUBLIC", rs.getString("TABLE_SCHEMA"));
assertEquals("TEST", rs.getString("TABLE_NAME"));
rs.getString("SESSION_ID");
if (config.mvcc || config.mvStore) {
if (config.mvStore) {
assertEquals("READ", rs.getString("LOCK_TYPE"));
} else {
assertEquals("WRITE", rs.getString("LOCK_TYPE"));
......@@ -67,7 +67,7 @@ public class TestSessionsLocks extends TestBase {
stat2.execute("SELECT * FROM TEST");
rs = stat.executeQuery("select * from information_schema.locks " +
"order by session_id");
if (!config.mvcc && !config.mvStore) {
if (!config.mvStore) {
rs.next();
assertEquals("PUBLIC", rs.getString("TABLE_SCHEMA"));
assertEquals("TEST", rs.getString("TABLE_NAME"));
......
......@@ -53,10 +53,7 @@ public class TestSpatial extends TestBase {
@Override
public void test() throws SQLException {
if (!config.mvStore && config.mvcc) {
return;
}
if (config.memory && config.mvcc) {
if (config.memory && config.mvStore) {
return;
}
if (DataType.GEOMETRY_CLASS != null) {
......
......@@ -85,7 +85,7 @@ public class TestTransaction extends TestBase {
conn.setAutoCommit(false);
ResultSet rs;
if (config.mvcc || config.mvStore) {
if (config.mvStore) {
rs = stat2.executeQuery("select count(*) from test");
rs.next();
assertEquals(0, rs.getInt(1));
......@@ -187,7 +187,7 @@ public class TestTransaction extends TestBase {
Connection conn2 = getConnection("transaction");
conn2.setAutoCommit(false);
Statement stat2 = conn2.createStatement();
if (config.mvcc) {
if (config.mvStore) {
stat2.execute("update test set name = 'Welt' where id = 2");
}
assertThrows(ErrorCode.LOCK_TIMEOUT_1, stat2).
......@@ -321,7 +321,7 @@ public class TestTransaction extends TestBase {
c2.setAutoCommit(false);
s1.executeUpdate("insert into A(code) values('one')");
Statement s2 = c2.createStatement();
if (config.mvcc || config.mvStore) {
if (config.mvStore) {
assertThrows(
ErrorCode.REFERENTIAL_INTEGRITY_VIOLATED_PARENT_MISSING_1, s2).
executeUpdate("insert into B values('two', 1)");
......
......@@ -111,7 +111,7 @@ public class TestTriggersConstraints extends TestBase implements Trigger {
}
private void testDeleteInTrigger() throws SQLException {
if (config.mvcc || config.mvStore) {
if (config.mvStore) {
return;
}
Connection conn;
......
......@@ -29,7 +29,6 @@ public class TestUpgrade extends TestBase {
*/
public static void main(String... a) throws Exception {
TestBase base = TestBase.createCaller().init();
base.config.mvcc = false;
base.config.mvStore = false;
base.test();
}
......
......@@ -111,10 +111,7 @@ public class TestUsingIndex extends TestBase {
}
private void testSpatialIndex() throws SQLException {
if (!config.mvStore && config.mvcc) {
return;
}
if (config.memory && config.mvcc) {
if (config.memory && config.mvStore) {
return;
}
if (DataType.GEOMETRY_CLASS == null) {
......@@ -147,10 +144,7 @@ public class TestUsingIndex extends TestBase {
}
private void testBadSpatialSyntax() throws SQLException {
if (!config.mvStore && config.mvcc) {
return;
}
if (config.memory && config.mvcc) {
if (config.memory && config.mvStore) {
return;
}
if (DataType.GEOMETRY_CLASS == null) {
......
......@@ -1271,7 +1271,7 @@ public class TestMetaData extends TestBase {
}
private void testSessionsUncommitted() throws SQLException {
if (config.mvcc || config.memory) {
if (config.mvStore || config.memory) {
return;
}
Connection conn = getConnection("metaData");
......
......@@ -28,7 +28,7 @@ public class TestTransactionIsolation extends TestBase {
@Override
public void test() throws SQLException {
if (config.mvcc || config.mvStore) {
if (config.mvStore) {
// no tests yet
} else {
testTableLevelLocking();
......
......@@ -30,7 +30,6 @@ public class TestMvcc1 extends TestBase {
*/
public static void main(String... a) throws Exception {
TestBase test = TestBase.createCaller().init();
test.config.mvcc = true;
test.test();
}
......@@ -59,7 +58,7 @@ public class TestMvcc1 extends TestBase {
}
private void testCases() throws SQLException {
if (!config.mvcc) {
if (!config.mvStore) {
return;
}
ResultSet rs;
......
......@@ -34,13 +34,12 @@ public class TestMvcc2 extends TestBase {
*/
public static void main(String... a) throws Exception {
TestBase test = TestBase.createCaller().init();
test.config.mvcc = true;
test.test();
}
@Override
public void test() throws Exception {
if (!config.mvcc) {
if (!config.mvStore) {
return;
}
deleteDb("mvcc2");
......
......@@ -26,7 +26,6 @@ public class TestMvcc3 extends TestBase {
*/
public static void main(String... a) throws Exception {
TestBase test = TestBase.createCaller().init();
test.config.mvcc = true;
test.test();
}
......@@ -63,7 +62,7 @@ public class TestMvcc3 extends TestBase {
}
private void testConcurrentUpdate() throws SQLException {
if (!config.mvcc) {
if (!config.mvStore) {
return;
}
deleteDb("mvcc3");
......@@ -102,7 +101,7 @@ public class TestMvcc3 extends TestBase {
}
private void testInsertUpdateRollback() throws SQLException {
if (!config.mvcc) {
if (!config.mvStore) {
return;
}
......@@ -147,7 +146,7 @@ public class TestMvcc3 extends TestBase {
}
private void testCreateTableAsSelect() throws SQLException {
if (!config.mvcc) {
if (!config.mvStore) {
return;
}
deleteDb("mvcc3");
......@@ -165,7 +164,7 @@ public class TestMvcc3 extends TestBase {
}
private void testRollback() throws SQLException {
if (!config.mvcc) {
if (!config.mvStore) {
return;
}
......@@ -218,7 +217,7 @@ public class TestMvcc3 extends TestBase {
}
private void testDisableAutoCommit() throws SQLException {
if (!config.mvcc) {
if (!config.mvStore) {
return;
}
deleteDb("mvcc3");
......
......@@ -26,7 +26,6 @@ public class TestMvcc4 extends TestBase {
*/
public static void main(String... a) throws Exception {
TestBase test = TestBase.createCaller().init();
test.config.mvcc = true;
test.config.lockTimeout = 20000;
test.config.memory = true;
test.test();
......@@ -34,7 +33,7 @@ public class TestMvcc4 extends TestBase {
@Override
public void test() throws SQLException {
if (config.networked || !config.mvcc) {
if (config.networked || !config.mvStore) {
return;
}
testSelectForUpdateAndUpdateConcurrency();
......
......@@ -30,7 +30,7 @@ public class TestMvccMultiThreaded extends TestBase {
@Override
public void test() throws Exception {
if (!config.mvcc) {
if (!config.mvStore) {
return;
}
testConcurrentSelectForUpdate();
......
......@@ -33,7 +33,6 @@ public class TestMvccMultiThreaded2 extends TestBase {
*/
public static void main(String... a) throws Exception {
TestBase test = TestBase.createCaller().init();
test.config.mvcc = true;
test.config.lockTimeout = 120000;
test.config.memory = true;
test.config.multiThreaded = true;
......@@ -47,7 +46,7 @@ public class TestMvccMultiThreaded2 extends TestBase {
@Override
public void test() throws SQLException, InterruptedException {
if (!config.mvcc) {
if (!config.mvStore) {
return;
}
testSelectForUpdateConcurrency();
......
......@@ -154,7 +154,7 @@ public class TestCrashAPI extends TestBase implements Runnable {
recoverAll();
return;
}
if (config.mvcc || config.networked) {
if (config.mvStore || config.networked) {
return;
}
int len = getSize(2, 6);
......@@ -531,7 +531,7 @@ public class TestCrashAPI extends TestBase implements Runnable {
@Override
public TestBase init(TestAll conf) throws Exception {
super.init(conf);
if (config.mvcc || config.networked) {
if (config.mvStore || config.networked) {
return this;
}
startServerIfRequired();
......
......@@ -123,7 +123,7 @@ public class TestMultiThreaded extends TestBase {
@Override
public void test() throws Exception {
if (config.mvcc) {
if (config.mvStore) {
return;
}
deleteDb("multiThreaded");
......
......@@ -27,7 +27,6 @@ public class TestReleaseSelectLock extends TestBase {
public static void main(String... a) throws Exception {
TestBase test = TestBase.createCaller().init();
test.config.mvStore = false;
test.config.mvcc = false;
test.config.multiThreaded = true;
test.test();
}
......
......@@ -33,7 +33,6 @@ public class TestJmx extends TestBase {
public static void main(String... a) throws Exception {
TestBase base = TestBase.createCaller().init();
base.config.mvStore = false;
base.config.mvcc = false;
base.test();
}
......@@ -114,7 +113,7 @@ public class TestJmx extends TestBase {
result = mbeanServer.invoke(name, "listSessions", null, null).toString();
assertContains(result, "session id");
if (config.mvcc || config.mvStore) {
if (config.mvStore) {
assertContains(result, "read lock");
} else {
assertContains(result, "write lock");
......
......@@ -33,7 +33,7 @@ public class TestMultiThreadedKernel extends TestBase implements Runnable {
@Override
public void test() throws Exception {
if (config.networked || config.mvcc) {
if (config.networked || config.mvStore) {
return;
}
deleteDb("multiThreadedKernel");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论