use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class cdsXid method suite.
public static Test suite() {
if (JDBC.vmSupportsJSR169()) {
// test uses unsupported classes like DriverManager, XADataSource,
// ConnectionPoolDataSource, ConnectionEvenListenere, as well as
// unsupported methods, like Connection.setTypeMap()...
BaseTestSuite suite = new BaseTestSuite("J2EEDatasourceTest cannot run with JSR169");
return suite;
} else {
BaseTestSuite suite = new BaseTestSuite("J2EEDataSourceTest suite");
// Add tests that will run with both embedded
suite.addTest(baseSuite(":embedded"));
// and network server/client
suite.addTest(TestConfiguration.clientServerDecorator(baseSuite(":client")));
// Add the tests that only run with client
suite.addTest(new SupportFilesSetup(TestConfiguration.clientServerDecorator(getClientSuite())));
// Add the tests that only run with embedded
suite.addTest(getEmbeddedSuite("embedded"));
// Add the tests relying on getting timeouts.
suite.addTest(getTimeoutSuite(":embedded"));
suite.addTest(TestConfiguration.clientServerDecorator(getTimeoutSuite(":client")));
// Note that not all fixtures need (all of) these.
return new CleanDatabaseTestSetup(suite) {
/**
* Create and populate database objects
*
* @see org.apache.derbyTesting.junit.CleanDatabaseTestSetup#decorateSQL(java.sql.Statement)
*/
protected void decorateSQL(Statement s) throws SQLException {
TestRoutines.installRoutines(getConnection());
s.executeUpdate("create table autocommitxastart(i int)");
s.executeUpdate("insert into autocommitxastart values 1,2,3,4,5");
s.executeUpdate("create schema SCHEMA_Patricio");
s.executeUpdate("create table " + "SCHEMA_Patricio.Patricio (id VARCHAR(255), value INTEGER)");
s.executeUpdate("create table intTable(i int)");
s.executeUpdate("create table hold_30 " + "(id int not null primary key, b char(30))");
s.executeUpdate("create procedure checkConn2(in dsname varchar(20)) " + "parameter style java language java modifies SQL DATA " + "external name " + "'org.apache.derbyTesting.functionTests.tests.jdbcapi.J2EEDataSourceTest." + getNestedMethodName() + "'");
s.execute("create table derby3799 (dClob clob)");
s.executeUpdate("insert into derby3799 values (" + "'myLittleTestClob')");
}
};
}
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class cdsXid method getTimeoutSuite.
/**
* Return a suite of tests that are run with a lower lock timeout.
*
* @param postfix suite name postfix
* @return A suite of tests being run with a lower lock timeout.
*/
private static Test getTimeoutSuite(String postfix) {
BaseTestSuite suite = new BaseTestSuite("Lower lock timeout" + postfix);
suite.addTest(new J2EEDataSourceTest("timeoutTestDerby1144PooledDS"));
suite.addTest(new J2EEDataSourceTest("timeoutTestDerby1144XADS"));
// Reduce the timeout threshold to make the tests run faster.
return DatabasePropertyTestSetup.setLockTimeouts(suite, 3, 5);
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class JDBCDriversPropertyTest method getSuite.
static final Test getSuite(String jdbcDrivers) throws Exception {
BaseTestSuite suite = new BaseTestSuite("jdbc.drivers=" + jdbcDrivers);
System.setProperty("jdbc.drivers", jdbcDrivers);
suite.addTest(getAutoLoadSuite());
return suite;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class JDBCHarnessJavaTest method suite.
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite("jdbcapi: old harness java tests");
suite.addTest(baseSuite("embedded", JDBCAPI_TESTS_BOTH));
suite.addTest(TestConfiguration.clientServerDecorator(baseSuite("clientserver", JDBCAPI_TESTS_BOTH)));
return suite;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class LDAPAuthenticationTest method baseSuite.
public static Test baseSuite(String name, String fixture) {
BaseTestSuite suite = new BaseTestSuite(name);
Test test = new LDAPAuthenticationTest(fixture);
setBaseProps(suite, test);
// a number of properties
return TestConfiguration.singleUseDatabaseDecorator(suite);
}
Aggregations