use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class _Suite method suite.
public static Test suite() throws Exception {
BaseTestSuite suite = new BaseTestSuite("client.am package-private");
suite.addTest(LogicalStatementEntityTest.suite());
return suite;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class DatabaseMetaDataTest method connectionPoolingSuite.
/**
* Returns a suite of tests to be run with connection pooling enabled.
*
* @param jdbcClient name of the client being used (for verbosity only)
* @return A suite of tests.
*/
private static Test connectionPoolingSuite(String jdbcClient) {
// Return an empty suite if running in JavaME environment.
if (JDBC.vmSupportsJSR169()) {
return new BaseTestSuite("Base connection pooling suite:DISABLED");
}
BaseTestSuite baseCpSuite = new BaseTestSuite("Base connection pooling suite");
// Add the tests here.
baseCpSuite.addTest(new DatabaseMetaDataTest("testConnectionSpecific"));
// Setup the two configurations; CPDS and XADS.
BaseTestSuite fullCpSuite = new BaseTestSuite("DatabaseMetaData with connection pooling:" + jdbcClient);
BaseTestSuite cpSuite = new BaseTestSuite("ConnectionPoolDataSource");
BaseTestSuite xaSuite = new BaseTestSuite("XADataSource");
cpSuite.addTest(TestConfiguration.connectionCPDecorator(baseCpSuite));
xaSuite.addTest(TestConfiguration.connectionXADecorator(baseCpSuite));
fullCpSuite.addTest(cpSuite);
fullCpSuite.addTest(xaSuite);
return fullCpSuite;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class DatabaseMetaDataTest method suite.
/**
* Default suite for running this test.
* @return the suite
*/
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite("DatabaseMetaDataTest");
suite.addTest(TestConfiguration.defaultSuite(DatabaseMetaDataTest.class));
// Add some tests to be run with connection pooling enabled.
suite.addTest(connectionPoolingSuite("embedded"));
suite.addTest(TestConfiguration.clientServerDecorator(connectionPoolingSuite("client")));
// Test for DERBY-2584 needs a fresh database to ensure that the
// meta-data queries haven't already been compiled. No need to run the
// test in client/server mode since it only tests the compilation of
// meta-data queries.
suite.addTest(TestConfiguration.singleUseDatabaseDecorator(new DatabaseMetaDataTest("initialCompilationTest")));
// The test for DERBY-4160 needs a fresh database to ensure that the
// meta-data queries haven't already been compiled.
suite.addTest(TestConfiguration.singleUseDatabaseDecorator(new DatabaseMetaDataTest("concurrentCompilationTest")));
// Test for DERBY-3693 needs a fresh database to ensure that the size
// of SYSTABLES is so small that creating a relatively small number of
// tables will cause the query plan for getTables() to be invalidated.
// Also, set a high lock timeout explicitly so that we can check that
// an internal timeout followed by a retry didn't happen, and set
// derby.language.stalePlanCheckInterval to a low value so that the
// invalidation happens earlier.
Properties props = new Properties();
props.setProperty("derby.locks.waitTimeout", "90");
props.setProperty("derby.language.stalePlanCheckInterval", "5");
suite.addTest(TestConfiguration.singleUseDatabaseDecorator(new DatabasePropertyTestSetup(new DatabaseMetaDataTest("recompileTimeoutTest"), props, true)));
return suite;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class DboPowersTest method suite.
/**
* Construct top level suite in this JUnit test
*
* @return A suite containing embedded and client suites
*/
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite("DboPowersTest");
/* Database shutdown powers */
suite.addTest(dboShutdownSuite("suite: shutdown powers, embedded"));
suite.addTest(TestConfiguration.clientServerDecorator(dboShutdownSuite("suite: shutdown powers, client")));
// the specification for JSR169 support in DERBY-97.
if (!JDBC.vmSupportsJSR169()) {
suite.addTest(dboCryptoSuite("suite: cryptographic powers, embedded"));
suite.addTest(TestConfiguration.clientServerDecorator(dboCryptoSuite("suite: cryptographic powers, client")));
}
/* Database hard upgrade powers */
suite.addTest(dboHardUpgradeSuite("suite: hard upgrade powers, embedded"));
suite.addTest(TestConfiguration.clientServerDecorator(dboHardUpgradeSuite("suite: hard upgrade powers, client")));
return suite;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class DboPowersTest method dboShutdownSuite.
/**
* Construct suite of tests for shutdown database action
*
* @param framework Derby framework name
* @return A suite containing the test case for shutdown
* incarnated for the three security levels no authentication,
* authentication, and authentication plus sqlAuthorization, The
* latter two has an instance for dbo, and one for an ordinary user,
* so there are in all five incarnations of tests.
*/
private static Test dboShutdownSuite(String framework) {
// one per authLevel
Test[] tests = new Test[SQLAUTHORIZATION + 1];
/* Tests without any authorization active (level ==
* NOAUTHENTICATION).
*/
BaseTestSuite noauthSuite = new BaseTestSuite("suite: security level=" + secLevelNames[NOAUTHENTICATION]);
noauthSuite.addTest(new DboPowersTest("testShutDown", NOAUTHENTICATION));
tests[NOAUTHENTICATION] = noauthSuite;
/* First decorate with users, then with authentication. Do this
* twice, once for authentication only, and once for
* authentication + sqlAuthorization (see extra decorator
* added below).
*/
for (int autLev = AUTHENTICATION; autLev <= SQLAUTHORIZATION; autLev++) {
tests[autLev] = wrapShutdownUserTests(autLev);
}
BaseTestSuite suite = new BaseTestSuite("dboPowers:" + framework);
/* run tests with no authentication enabled */
suite.addTest(tests[NOAUTHENTICATION]);
/* run test for all users with only authentication enabled */
suite.addTest(tests[AUTHENTICATION]);
/* run test for all users with authentication and
* sqlAuthorization enabled
*/
suite.addTest(TestConfiguration.sqlAuthorizationDecorator(tests[SQLAUTHORIZATION]));
return suite;
}
Aggregations