use of org.apache.derbyTesting.junit.CleanDatabaseTestSetup in project derby by apache.
the class GrantRevokeDDLTest method suite.
public static Test suite() {
if (JDBC.vmSupportsJSR169()) {
// return empty suite;
return new BaseTestSuite("GrantRevokeDDLTest");
}
// test uses triggers and procedures that use DriverManager.
BaseTestSuite suite = new BaseTestSuite(GrantRevokeDDLTest.class, "GrantRevokeDDL Test");
Test test = new SupportFilesSetup(suite);
test = new CleanDatabaseTestSetup(test);
test = DatabasePropertyTestSetup.builtinAuthentication(test, users, "grantrevokeddl");
test = TestConfiguration.sqlAuthorizationDecorator(test);
return test;
}
use of org.apache.derbyTesting.junit.CleanDatabaseTestSetup in project derby by apache.
the class DateTimeTest method baseSuite.
protected static Test baseSuite(String name) {
BaseTestSuite suite = new BaseTestSuite(name);
suite.addTestSuite(DateTimeTest.class);
return new CleanDatabaseTestSetup(suite) {
/**
* Creates the tables used in the test cases.
* @exception SQLException if a database error occurs
*/
protected void decorateSQL(Statement stmt) throws SQLException {
createTableForArithmeticTest(stmt);
createTableForSyntaxTest(stmt);
createTableForConversionTest(stmt);
createTableForISOFormatTest(stmt);
}
};
}
use of org.apache.derbyTesting.junit.CleanDatabaseTestSetup in project derby by apache.
the class DeadlockDetectionTest method suite.
public static Test suite() {
// Deadlock detection is engine functionality, so only test embedded.
Test test = TestConfiguration.embeddedSuite(DeadlockDetectionTest.class);
// Reduce the deadlock timeout since this test expects deadlocks, and
// we want to detect them quickly in order to reduce the test time.
// We don't expect any wait timeouts, so set the wait timeout
// sufficiently high to prevent that queries time out before we have
// set up the deadlock on slow machines.
test = DatabasePropertyTestSetup.setLockTimeouts(test, 1, 30);
return new CleanDatabaseTestSetup(test);
}
use of org.apache.derbyTesting.junit.CleanDatabaseTestSetup in project derby by apache.
the class DeadlockModeTest method baseSuite.
protected static Test baseSuite(String name) {
BaseTestSuite suite = new BaseTestSuite(name);
suite.addTestSuite(DeadlockModeTest.class);
return new CleanDatabaseTestSetup(DatabasePropertyTestSetup.setLockTimeouts(suite, 2, 4)) {
/**
* Creates the tables used in the test cases.
* @exception SQLException if a database error occurs
*/
protected void decorateSQL(Statement stmt) throws SQLException {
stmt.execute("create table t (i int)");
stmt.executeUpdate("insert into t values (1956)");
stmt.executeUpdate("insert into t values (180)");
stmt.executeUpdate("insert into t values (3)");
}
};
}
use of org.apache.derbyTesting.junit.CleanDatabaseTestSetup in project derby by apache.
the class ForBitDataTest method baseSuite.
protected static Test baseSuite(String name) {
BaseTestSuite suite = new BaseTestSuite(name);
suite.addTestSuite(ForBitDataTest.class);
return new CleanDatabaseTestSetup(suite) {
protected void decorateSQL(Statement s) throws SQLException {
for (int i = 0; i < TABLES.length; i++) {
s.execute(TABLES[i]);
}
}
};
}
Aggregations