use of org.apache.derbyTesting.junit.SystemPropertyTestSetup in project derby by apache.
the class TriggerTests method suite.
public static Test suite() {
Test suite = new CleanDatabaseTestSetup(TestConfiguration.embeddedSuite(TriggerTests.class));
Properties p = new Properties();
// use small pageCacheSize so we don't run out of memory on the insert
// of large LOB columns.
p.setProperty("derby.storage.pageCacheSize", "100");
return new SystemPropertyTestSetup(suite, p);
}
use of org.apache.derbyTesting.junit.SystemPropertyTestSetup in project derby by apache.
the class ClobMemTest method suite.
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite();
// Just add Derby-6096 embedded as it takes time to run
suite.addTest(new ClobMemTest("xtestderby6096ClobHashJoin"));
suite.addTest(TestConfiguration.defaultSuite(ClobMemTest.class));
Properties p = new Properties();
// use small pageCacheSize so we don't run out of memory on the insert.
p.setProperty("derby.storage.pageCacheSize", "100");
return new SystemPropertyTestSetup(suite, p);
}
use of org.apache.derbyTesting.junit.SystemPropertyTestSetup in project derby by apache.
the class ij3Test method suite.
public static Test suite() {
Properties props = new Properties();
props.setProperty("ij.database", "jdbc:derby:wombat;create=true");
props.setProperty("ij.showNoConnectionsAtStart", "true");
props.setProperty("ij.showNoCountForSelect", "true");
Test test = new SystemPropertyTestSetup(new ij3Test("ij3"), props);
test = new CleanDatabaseTestSetup(test);
return getIJConfig(test);
}
use of org.apache.derbyTesting.junit.SystemPropertyTestSetup 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);
}
use of org.apache.derbyTesting.junit.SystemPropertyTestSetup in project derby by apache.
the class HarnessJavaTest method decorate.
/**
* Decorate a HarnessJavaTest test. Any sub-class must
* call this decorator when adding a test to a suite.
* This sets up the ij system properties to setup
* the default connection to be to the default database.
* The lock timeouts are also shortened and the test
* will start in a clean database.
*/
protected static Test decorate(HarnessJavaTest test) {
Test dtest = new SystemPropertyTestSetup(test, new Properties()) {
protected void setUp() throws java.lang.Exception {
TestConfiguration config = TestConfiguration.getCurrent();
// With JDBC 3 connect using a JDBC URL
if (JDBC.vmSupportsJDBC3()) {
newValues.setProperty("ij.database", config.getJDBCUrl());
}
super.setUp();
}
};
dtest = DatabasePropertyTestSetup.setLockTimeouts(dtest, 4, 6);
dtest = new CleanDatabaseTestSetup(dtest);
return dtest;
}
Aggregations