use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class BootLockTest method decorateTest.
/**
* Decorate test with singleUseDatabaseDecorator and noSecurityManager.
*
* @return the decorated test
*/
private static Test decorateTest() {
Test test = new BaseTestSuite(BootLockTest.class);
if (JDBC.vmSupportsJSR169() && !isJ9Platform()) {
// PhoneME requires forceDatabaseLock
Properties props = new Properties();
props.setProperty("derby.database.forceDatabaseLock", "true");
test = new SystemPropertyTestSetup(test, props, true);
}
test = TestConfiguration.singleUseDatabaseDecorator(test, dbName);
test = SecurityManagerSetup.noSecurityManager(test);
return test;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class ClassLoaderBootTest method suite.
/**
* Runs the tests in the default embedded configuration and then
* the client server configuration.
*/
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite(ClassLoaderBootTest.class);
Test test = suite;
TestSetup setup = new CleanDatabaseTestSetup(test) {
protected void setUp() throws Exception {
super.setUp();
// shutdown the database.
DataSource ds = JDBCDataSource.getDataSource();
JDBCDataSource.shutdownDatabase(ds);
}
};
Properties p = new Properties();
p.setProperty("derby.infolog.append", "true");
setup = new SystemPropertyTestSetup(setup, p);
// on. Have to run without security manager for now.
return SecurityManagerSetup.noSecurityManager(setup);
// return setup;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class DecryptDatabaseTest method suite.
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite("DecryptDatabaseTest suite");
suite.addTest(wrapTest());
suite.addTest(wrapTest("AES/OFB/NoPadding"));
return suite;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class Derby3625Test method suite.
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite("Derby3625Test");
suite.addTest(baseSuite("Derby36625Test:embedded"));
return suite;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class Derby4577Test method baseSuite.
protected static Test baseSuite(String name) {
BaseTestSuite suite = new BaseTestSuite(name);
suite.addTestSuite(Derby4577Test.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 {
Connection conn = stmt.getConnection();
// create a table, with blob it will be 32k page size
stmt.executeUpdate("CREATE TABLE testBadUpdate (id int, value blob(1M))");
stmt.executeUpdate("CREATE TABLE testSmallRow1 (id char(1))");
stmt.executeUpdate("CREATE TABLE testSmallRow2 (id char(1))");
stmt.executeUpdate("CREATE TABLE testSmallRow3 (id char(20), id2 int)");
conn.setAutoCommit(false);
}
};
}
Aggregations