use of org.h2.test.synth.TestBtreeIndex in project h2database by h2database.
the class TestAll method run.
private static void run(String... args) throws Exception {
SelfDestructor.startCountdown(4 * 60);
long time = System.nanoTime();
printSystemInfo();
// use lower values, to better test those cases,
// and (for delays) to speed up the tests
System.setProperty("h2.maxMemoryRows", "100");
System.setProperty("h2.check2", "true");
System.setProperty("h2.delayWrongPasswordMin", "0");
System.setProperty("h2.delayWrongPasswordMax", "0");
System.setProperty("h2.useThreadContextClassLoader", "true");
// System.setProperty("h2.modifyOnWrite", "true");
// speedup
// System.setProperty("h2.syncMethod", "");
/*
recovery tests with small freeList pages, page size 64
reopen org.h2.test.unit.TestPageStore
-Xmx1500m -D reopenOffset=3 -D reopenShift=1
power failure test
power failure test: MULTI_THREADED=TRUE
power failure test: larger binaries and additional index.
power failure test with randomly generating / dropping indexes and tables.
drop table test;
create table test(id identity, name varchar(100) default space(100));
@LOOP 10 insert into test select null, null from system_range(1, 100000);
delete from test;
documentation: review package and class level javadocs
documentation: rolling review at main.html
-------------
remove old TODO, move to roadmap
kill a test:
kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
*/
TestAll test = new TestAll();
if (args.length > 0) {
if ("travis".equals(args[0])) {
test.travis = true;
test.testAll();
} else if ("vmlens".equals(args[0])) {
test.vmlens = true;
test.testAll();
} else if ("reopen".equals(args[0])) {
System.setProperty("h2.delayWrongPasswordMin", "0");
System.setProperty("h2.check2", "false");
System.setProperty("h2.analyzeAuto", "100");
System.setProperty("h2.pageSize", "64");
System.setProperty("h2.reopenShift", "5");
FilePathRec.register();
test.reopen = true;
TestReopen reopen = new TestReopen();
reopen.init();
FilePathRec.setRecorder(reopen);
test.runTests();
} else if ("crash".equals(args[0])) {
test.endless = true;
new TestCrashAPI().runTest(test);
} else if ("synth".equals(args[0])) {
new TestSynth().runTest(test);
} else if ("kill".equals(args[0])) {
new TestKill().runTest(test);
} else if ("random".equals(args[0])) {
test.endless = true;
new TestRandomSQL().runTest(test);
} else if ("join".equals(args[0])) {
new TestJoin().runTest(test);
test.endless = true;
} else if ("btree".equals(args[0])) {
new TestBtreeIndex().runTest(test);
} else if ("all".equals(args[0])) {
test.testEverything();
} else if ("codeCoverage".equals(args[0])) {
test.codeCoverage = true;
test.runCoverage();
} else if ("multiThread".equals(args[0])) {
new TestMulti().runTest(test);
} else if ("halt".equals(args[0])) {
new TestHaltApp().runTest(test);
} else if ("timer".equals(args[0])) {
new TestTimer().runTest(test);
}
} else {
test.testAll();
}
System.out.println(TestBase.formatTime(TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - time)) + " total");
}
use of org.h2.test.synth.TestBtreeIndex in project h2database by h2database.
the class TestAll method test.
/**
* Run all tests with the current settings.
*/
private void test() throws SQLException {
System.out.println();
System.out.println("Test " + toString() + " (" + Utils.getMemoryUsed() + " KB used)");
beforeTest();
// db
addTest(new TestScriptSimple());
addTest(new TestScript());
addTest(new TestAlter());
addTest(new TestAlterSchemaRename());
addTest(new TestAutoRecompile());
addTest(new TestBackup());
addTest(new TestBigDb());
addTest(new TestBigResult());
addTest(new TestCases());
addTest(new TestCheckpoint());
addTest(new TestCompatibility());
addTest(new TestCompatibilityOracle());
addTest(new TestCsv());
addTest(new TestDeadlock());
if (vmlens) {
return;
}
addTest(new TestDrop());
addTest(new TestDuplicateKeyUpdate());
addTest(new TestEncryptedDb());
addTest(new TestExclusive());
addTest(new TestFullText());
addTest(new TestFunctionOverload());
addTest(new TestFunctions());
addTest(new TestInit());
addTest(new TestIndex());
addTest(new TestIndexHints());
addTest(new TestLargeBlob());
addTest(new TestLinkedTable());
addTest(new TestListener());
addTest(new TestLob());
addTest(new TestMergeUsing());
addTest(new TestMultiConn());
addTest(new TestMultiDimension());
addTest(new TestMultiThreadedKernel());
addTest(new TestOpenClose());
addTest(new TestOptimizations());
addTest(new TestOptimizerHints());
addTest(new TestOutOfMemory());
addTest(new TestReadOnly());
addTest(new TestRecursiveQueries());
addTest(new TestGeneralCommonTableQueries());
if (!memory) {
// requires persistent store for reconnection tests
addTest(new TestPersistentCommonTableExpressions());
}
addTest(new TestRights());
addTest(new TestRunscript());
addTest(new TestSQLInjection());
addTest(new TestSessionsLocks());
addTest(new TestSelectCountNonNullColumn());
addTest(new TestSequence());
addTest(new TestShow());
addTest(new TestSpaceReuse());
addTest(new TestSpatial());
addTest(new TestSpeed());
addTest(new TestTableEngines());
addTest(new TestRowFactory());
addTest(new TestTempTables());
addTest(new TestTransaction());
addTest(new TestTriggersConstraints());
addTest(new TestTwoPhaseCommit());
addTest(new TestView());
addTest(new TestViewAlterTable());
addTest(new TestViewDropView());
addTest(new TestReplace());
addTest(new TestSynonymForTable());
addTest(new TestColumnNamer());
// jaqu
addTest(new AliasMapTest());
addTest(new AnnotationsTest());
addTest(new ClobTest());
addTest(new ModelsTest());
addTest(new SamplesTest());
addTest(new UpdateTest());
// jdbc
addTest(new TestBatchUpdates());
addTest(new TestCallableStatement());
addTest(new TestCancel());
addTest(new TestConcurrentConnectionUsage());
addTest(new TestConnection());
addTest(new TestDatabaseEventListener());
addTest(new TestJavaObject());
addTest(new TestLimitUpdates());
addTest(new TestLobApi());
addTest(new TestManyJdbcObjects());
addTest(new TestMetaData());
addTest(new TestNativeSQL());
addTest(new TestPreparedStatement());
addTest(new TestResultSet());
addTest(new TestStatement());
addTest(new TestGetGeneratedKeys());
addTest(new TestTransactionIsolation());
addTest(new TestUpdatableResultSet());
addTest(new TestZloty());
addTest(new TestCustomDataTypesHandler());
addTest(new TestSetCollation());
// jdbcx
addTest(new TestConnectionPool());
addTest(new TestDataSource());
addTest(new TestXA());
addTest(new TestXASimple());
// server
addTest(new TestAutoServer());
addTest(new TestNestedLoop());
// mvcc & row level locking
addTest(new TestMvcc1());
addTest(new TestMvcc2());
addTest(new TestMvcc3());
addTest(new TestMvcc4());
addTest(new TestMvccMultiThreaded());
addTest(new TestMvccMultiThreaded2());
addTest(new TestRowLocks());
// synth
addTest(new TestBtreeIndex());
addTest(new TestConcurrentUpdate());
addTest(new TestDiskFull());
addTest(new TestCrashAPI());
addTest(new TestFuzzOptimizations());
addTest(new TestLimit());
addTest(new TestRandomCompare());
addTest(new TestKillRestart());
addTest(new TestKillRestartMulti());
addTest(new TestMultiThreaded());
addTest(new TestOuterJoins());
addTest(new TestNestedJoins());
addTest(new TestStringAggCompatibility());
runAddedTests();
// serial
addTest(new TestDateStorage());
addTest(new TestDriver());
addTest(new TestJavaObjectSerializer());
addTest(new TestLocale());
addTest(new TestMemoryUsage());
addTest(new TestMultiThread());
addTest(new TestPowerOff());
addTest(new TestReorderWrites());
addTest(new TestRandomSQL());
addTest(new TestQueryCache());
addTest(new TestUrlJavaObjectSerializer());
addTest(new TestWeb());
runAddedTests(1);
afterTest();
}
Aggregations