Search in sources :

Example 1 with JDBCClientSetup

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;
}
Also used : Test(junit.framework.Test) SystemPropertyTestSetup(org.apache.derbyTesting.junit.SystemPropertyTestSetup) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite) JDBCClientSetup(org.apache.derbyTesting.junit.JDBCClientSetup) NetworkServerTestSetup(org.apache.derbyTesting.junit.NetworkServerTestSetup)

Example 2 with JDBCClientSetup

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);
}
Also used : ClassLoaderTestSetup(org.apache.derbyTesting.junit.ClassLoaderTestSetup) TestSetup(junit.extensions.TestSetup) SystemPropertyTestSetup(org.apache.derbyTesting.junit.SystemPropertyTestSetup) SystemPropertyTestSetup(org.apache.derbyTesting.junit.SystemPropertyTestSetup) Properties(java.util.Properties) JDBCClientSetup(org.apache.derbyTesting.junit.JDBCClientSetup)

Aggregations

JDBCClientSetup (org.apache.derbyTesting.junit.JDBCClientSetup)2 SystemPropertyTestSetup (org.apache.derbyTesting.junit.SystemPropertyTestSetup)2 Properties (java.util.Properties)1 TestSetup (junit.extensions.TestSetup)1 Test (junit.framework.Test)1 BaseTestSuite (org.apache.derbyTesting.junit.BaseTestSuite)1 ClassLoaderTestSetup (org.apache.derbyTesting.junit.ClassLoaderTestSetup)1 NetworkServerTestSetup (org.apache.derbyTesting.junit.NetworkServerTestSetup)1