Search in sources :

Example 61 with BaseTestSuite

use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.

the class SimplePerfTest method suite.

public static Test suite() throws Exception {
    masterHostName = System.getProperty("test.serverHost", "localhost");
    masterPortNo = Integer.parseInt(System.getProperty("test.serverPort", "1527"));
    dbPath = System.getProperty("test.dbPath", "wombat");
    BaseTestSuite suite = new BaseTestSuite("SimplePerfTest");
    tuplesToInsert = Integer.parseInt(System.getProperty("test.inserts", "1000"));
    commitFreq = Integer.parseInt(System.getProperty("test.commitFreq", "0"));
    suite.addTest(SimplePerfTest.suite(masterHostName, masterPortNo, dbPath));
    return (Test) suite;
}
Also used : Test(junit.framework.Test) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Example 62 with BaseTestSuite

use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.

the class StandardTests method all.

/* All the above are pure Tests. To handle suites
     * we will have to duplicate the .suite() structure starting at .suites.all!
     *
     * The following is WORK IN PROGRESS: NOT READY FOR USE! FIXME!
     */
public static Test all(String serverHost, int serverPort) throws Exception {
    BaseTestSuite suite = new BaseTestSuite("All_" + serverHost + ":" + serverPort);
    // All package tests
    // This won't work as there are no 'testXXXX' methods
    // in AllPackages. Must create a suite() following the pattern of suites.All suite().
    // This is probably correct anyway as we presumably won't use all
    // tests in the replication testing?
    // Problem is we get a parallell structure which needs maintenance!
    suite.addTest(// false: because adds clean/decorate below
    TestConfiguration.existingServerSuite(// false: because adds clean/decorate below
    AllPackages.class, // false: because adds clean/decorate below
    false, serverHost, serverPort));
    // Instead:
    suite.addTest(// false: because adds clean/decorate below
    TestConfiguration.existingServerSuite(// false: because adds clean/decorate below
    allPackagesSuite(), // false: because adds clean/decorate below
    false, serverHost, serverPort));
    // Encrypted tests
    suite.addTest(// false: because adds clean/decorate below
    TestConfiguration.existingServerSuite(// false: because adds clean/decorate below
    EncryptionSuite.class, // false: because adds clean/decorate below
    false, serverHost, serverPort));
    CleanDatabaseTestSetup cdts = new CleanDatabaseTestSetup(suite, // Use networkclient when running setUp/decorateSQL
    true, serverHost, serverPort) {

        public void decorateSQL(Statement s) throws SQLException {
        // decorate(s);
        }
    };
    return cdts;
}
Also used : EncryptionSuite(org.apache.derbyTesting.functionTests.suites.EncryptionSuite) CleanDatabaseTestSetup(org.apache.derbyTesting.junit.CleanDatabaseTestSetup) Statement(java.sql.Statement) AllPackages(org.apache.derbyTesting.functionTests.suites.AllPackages) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Example 63 with BaseTestSuite

use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.

the class TestPostStartedMasterAndSlave_StopMaster method suite.

public static Test suite() throws Exception {
    System.out.println("**** TestPostStartedMasterAndSlave_StopMaster.suite()");
    initEnvironment();
    // String masterHostName = System.getProperty("test.serverHost", "localhost");
    // int masterPortNo = Integer.parseInt(System.getProperty("test.serverPort", "1527"));
    BaseTestSuite suite = new BaseTestSuite("TestPostStartedMasterAndSlave_StopMaster");
    // master?
    suite.addTest(TestPostStartedMasterAndSlave_StopMaster.suite(slaveServerHost, slaveServerPort));
    System.out.println("*** Done suite.addTest(TestPostStartedMasterAndSlave_StopMaster.suite())");
    return (Test) suite;
}
Also used : Test(junit.framework.Test) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Example 64 with BaseTestSuite

use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.

the class TestPostStartedMasterAndSlave_StopSlave method suite.

public static Test suite() throws Exception {
    System.out.println("**** TestPostStartedMasterAndSlave_StopSlave.suite()");
    initEnvironment();
    // String masterHostName = System.getProperty("test.serverHost", "localhost");
    // int masterPortNo = Integer.parseInt(System.getProperty("test.serverPort", "1527"));
    BaseTestSuite suite = new BaseTestSuite("TestPostStartedMasterAndSlave_StopSlave");
    // master?
    suite.addTest(TestPostStartedMasterAndSlave_StopSlave.suite(slaveServerHost, slaveServerPort));
    System.out.println("*** Done suite.addTest(TestPostStartedMasterAndSlave_StopSlave.suite())");
    return (Test) suite;
}
Also used : Test(junit.framework.Test) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Example 65 with BaseTestSuite

use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.

the class TestPostStoppedSlaveServer method suite.

public static Test suite() throws Exception {
    System.out.println("**** TestPostStoppedSlaveServer.suite()");
    initEnvironment();
    // String masterHostName = System.getProperty("test.serverHost", "localhost");
    // int masterPortNo = Integer.parseInt(System.getProperty("test.serverPort", "1527"));
    BaseTestSuite suite = new BaseTestSuite("TestPostStoppedSlaveServer");
    suite.addTest(TestPostStoppedSlaveServer.suite(slaveServerHost, slaveServerPort));
    System.out.println("*** Done suite.addTest(TestPostStoppedSlaveServer.suite())");
    return (Test) suite;
}
Also used : Test(junit.framework.Test) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Aggregations

BaseTestSuite (org.apache.derbyTesting.junit.BaseTestSuite)476 Test (junit.framework.Test)136 CleanDatabaseTestSetup (org.apache.derbyTesting.junit.CleanDatabaseTestSetup)118 Statement (java.sql.Statement)81 PreparedStatement (java.sql.PreparedStatement)68 SupportFilesSetup (org.apache.derbyTesting.junit.SupportFilesSetup)49 Properties (java.util.Properties)43 SystemPropertyTestSetup (org.apache.derbyTesting.junit.SystemPropertyTestSetup)34 CallableStatement (java.sql.CallableStatement)19 Connection (java.sql.Connection)14 SecurityManagerSetup (org.apache.derbyTesting.junit.SecurityManagerSetup)13 DatabasePropertyTestSetup (org.apache.derbyTesting.junit.DatabasePropertyTestSetup)11 TestSetup (junit.extensions.TestSetup)10 SQLException (java.sql.SQLException)7 LocaleTestSetup (org.apache.derbyTesting.junit.LocaleTestSetup)7 Method (java.lang.reflect.Method)5 Locale (java.util.Locale)5 BaseJDBCTestSetup (org.apache.derbyTesting.junit.BaseJDBCTestSetup)4 NetworkServerTestSetup (org.apache.derbyTesting.junit.NetworkServerTestSetup)4 ResultSet (java.sql.ResultSet)3