use of org.apache.derbyTesting.junit.JDBCClientSetup in project derby by apache.
the class LoginTimeoutTest method suite.
// /////////////////////////////////////////////////////////////////////////////////
//
// JUnit MACHINERY
//
// /////////////////////////////////////////////////////////////////////////////////
/**
* Return suite with all tests of the class.
*/
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite();
Test embedded = new BaseTestSuite(LoginTimeoutTest.class, "embedded LoginTimeoutTest");
embedded = TestConfiguration.singleUseDatabaseDecorator(embedded);
embedded = new SystemPropertyTestSetup(embedded, systemProperties());
suite.addTest(embedded);
if (Derby.hasServer() && Derby.hasClient()) {
Test clientServer = new BaseTestSuite(LoginTimeoutTest.class, "client/server LoginTimeoutTest");
clientServer = TestConfiguration.singleUseDatabaseDecorator(clientServer);
clientServer = new JDBCClientSetup(clientServer, JDBCClient.DERBYNETCLIENT);
clientServer = new NetworkServerTestSetup(clientServer, systemPropertiesArray(), new String[] {}, true);
suite.addTest(clientServer);
}
return suite;
}
use of org.apache.derbyTesting.junit.JDBCClientSetup in project derby by apache.
the class UpgradeTrajectoryTest method addTrajectory.
/**
* <p>
* Add a single trajectory to the suite, with upgrade instructions.
* </p>
*/
private static void addTrajectory(BaseTestSuite suite, Version.Trajectory trajectory, boolean[] hardUpgradeRequests) {
UpgradeTrajectoryTest utt = new UpgradeTrajectoryTest(trajectory, hardUpgradeRequests);
TestSetup setup = TestConfiguration.additionalDatabaseDecorator(utt, UPGRADED_DATABASE);
setup = TestConfiguration.additionalDatabaseDecorator(setup, VIRGIN_DATABASE);
setup = TestConfiguration.additionalDatabaseDecorator(setup, COMPARISON_DATABASE);
Properties preReleaseUpgrade = new Properties();
preReleaseUpgrade.setProperty("derby.database.allowPreReleaseUpgrade", "true");
setup = new SystemPropertyTestSetup(setup, preReleaseUpgrade);
// the version-specific classloader.
if (trajectory.getVersion(0).compareTo(VERSION_10_2_2_0) < 0) {
setup = new JDBCClientSetup(setup, JDBCClient.EMBEDDED_30);
}
suite.addTest(setup);
}
Aggregations