use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class ResultSetMiscTest method baseSuite.
public static Test baseSuite(String name) {
BaseTestSuite suite = new BaseTestSuite(name);
suite.addTestSuite(ResultSetMiscTest.class);
// Some test cases expect lock timeouts, so reduce the timeout to
// make the test go faster.
Test test = DatabasePropertyTestSetup.setLockTimeouts(suite, 1, 3);
return new CleanDatabaseTestSetup(test) {
/**
* Creates the table used in the test cases.
*/
protected void decorateSQL(Statement s) throws SQLException {
s.execute("create table t (i int, s smallint, r real, " + "d double precision, dt date, t time, ts timestamp, " + "c char(10), v varchar(40) not null, dc dec(10,2)," + "bi bigint, cbd char(10) for bit data," + "vbd varchar(10) for bit data,lvbd long varchar for bit data," + "cl clob(2G), bl blob(1G) )");
s.execute("insert into t values(1,2,3.3,4.4,date('1990-05-05')," + "time('12:06:06'),timestamp('1990-07-07 07:07:07.000007')," + "'eight','nine', 10.1, 11," + Utilities.stringToHexLiteral("twelv") + "," + Utilities.stringToHexLiteral("3teen") + "," + Utilities.stringToHexLiteral("4teen") + ", null, null)");
s.execute("CREATE PROCEDURE WAIT_FOR_POST_COMMIT() " + "LANGUAGE JAVA EXTERNAL NAME " + "'org.apache.derbyTesting.functionTests.util." + "T_Access.waitForPostCommitToFinish' " + "PARAMETER STYLE JAVA");
}
};
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class SURQueryMixTest method createTestCases.
private static BaseTestSuite createTestCases(final String modelName) {
BaseTestSuite suite = new BaseTestSuite();
for (int doPos = 0; doPos < 2; doPos++) {
// true if to use positioned updates
boolean positioned = doPos > 0;
for (int i = 0; i < selectConditions.length; i++) {
for (int j = 0; j < projectConditions.length; j++) {
final String cursorName = "cursor_" + i + "_" + j;
final String stmtString = "SELECT " + projectConditions[j] + " FROM T1 " + selectConditions[i];
suite.addTest(new SURQueryMixTest(modelName, stmtString, cursorName, positioned));
}
}
}
return suite;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class SURQueryMixTest method suite.
/**
* Run in client and embedded.
*/
public static Test suite() {
BaseTestSuite mainSuite = new BaseTestSuite("SURQueryMixTest suite");
mainSuite.addTest(baseSuite("SURQueryMixTest:embedded"));
mainSuite.addTest(TestConfiguration.clientServerDecorator(baseSuite("SURQueryMixTest:client")));
return mainSuite;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class SURTest method baseSuite.
/**
* The suite contains all testcases in this class running on different
* data models
*/
private static Test baseSuite(String name) {
BaseTestSuite mainSuite = new BaseTestSuite(name);
// Iterate over all data models and decorate the tests:
for (Iterator i = SURDataModelSetup.SURDataModel.values().iterator(); i.hasNext(); ) {
SURDataModelSetup.SURDataModel model = (SURDataModelSetup.SURDataModel) i.next();
BaseTestSuite suite = new BaseTestSuite(SURTest.class);
TestSetup decorator = new SURDataModelSetup(suite, model);
mainSuite.addTest(decorator);
}
return mainSuite;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class SURTest method suite.
/**
* Run the base suite in embedded and client mode.
*/
public static Test suite() {
BaseTestSuite mainSuite = new BaseTestSuite("SURTest");
mainSuite.addTest(baseSuite("SURTest:embedded"));
mainSuite.addTest(TestConfiguration.clientServerDecorator(baseSuite("SURTest:client")));
return mainSuite;
}
Aggregations