Search in sources :

Example 31 with BaseTestSuite

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

the class Derby5165Test method suite.

public static Test suite() {
    // the test requires XADataSource to run
    if (JDBC.vmSupportsJDBC3()) {
        // Test test = TestConfiguration.defaultSuite(Derby5165Test.class);
        Test test = TestConfiguration.embeddedSuite(Derby5165Test.class);
        // Set the lock timeout back to the default, because when
        // running in a bigger suite the value may have been
        // altered by an earlier test
        test = DatabasePropertyTestSetup.setLockTimeouts(test, 2, 4);
        test = TestConfiguration.singleUseDatabaseDecorator(test, "d5165db");
        test = TestConfiguration.singleUseDatabaseDecorator(test, "d5165db2");
        test = TestConfiguration.singleUseDatabaseDecorator(test, "d5165db3");
        test = TestConfiguration.singleUseDatabaseDecorator(test, "d5165db4");
        return test;
    }
    return new BaseTestSuite("Derby5165Test cannot run without XA support");
}
Also used : Test(junit.framework.Test) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Example 32 with BaseTestSuite

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

the class DriverTest method suite.

public static Test suite() {
    // java.sql.Driver is not supported with JSR169, so return empty suite
    if (JDBC.vmSupportsJSR169()) {
        return new BaseTestSuite("DriverTest tests java.sql.Driver, not supported with JSR169");
    }
    BaseTestSuite suite = new BaseTestSuite("DriverTest");
    suite.addTest(baseSuite("DriverTest:embedded"));
    suite.addTest(TestConfiguration.clientServerDecorator(baseSuite("DriverTest:client")));
    return suite;
}
Also used : BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Example 33 with BaseTestSuite

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

the class InvalidLDAPServerAuthenticationTest method baseSuite.

public static Test baseSuite(String name) {
    BaseTestSuite suite = new BaseTestSuite(name);
    Test test = new InvalidLDAPServerAuthenticationTest("testInvalidLDAPServerConnectionError");
    suite.addTest(test);
    // for shutdown after, as we're going to make the database unusable
    return TestConfiguration.singleUseDatabaseDecoratorNoShutdown(suite);
}
Also used : Test(junit.framework.Test) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Example 34 with BaseTestSuite

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

the class ParameterMetaDataJdbc30Test method suite.

/**
 * Create suite containing client and embedded tests and to run
 * all tests in this class
 */
public static Test suite() {
    BaseTestSuite suite = new BaseTestSuite("ParameterMetaDataJdbc30Test");
    if (JDBC.vmSupportsJSR169()) {
        return new BaseTestSuite("Empty ParameterMetaDataJDBC30. " + "JSR169 does not support ParameterMetaData");
    } else {
        suite.addTest(baseSuite("ParameterMetaDataJdbc30Test:embedded"));
        suite.addTest(TestConfiguration.clientServerDecorator(baseSuite("ParameterMetaDataJdbc30Test:client")));
    }
    return suite;
}
Also used : BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Example 35 with BaseTestSuite

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

the class PoolDSAuthenticationTest method suite.

public static Test suite() {
    // JSR169
    if (JDBC.vmSupportsJSR169())
        return new BaseTestSuite("ConnectionPoolDataSource not available" + " with JSR169; empty test");
    else {
        BaseTestSuite suite = new BaseTestSuite("PoolDSAuthenticationTest");
        suite.addTest(baseSuite("PoolDSAuthenticationTest:embedded"));
        suite.addTest(TestConfiguration.clientServerDecorator(baseSuite("PoolDSAuthenticationTest:client")));
        return suite;
    }
}
Also used : 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