Search in sources :

Example 41 with SystemPropertyTestSetup

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

the class CustomMBeanServerBuilderTest method suite.

public static Test suite() {
    Properties props = new Properties();
    props.setProperty("javax.management.builder.initial", "org.apache.derbyTesting.functionTests.tests.management.CustomMBeanServerBuilder");
    Test suite = TestConfiguration.embeddedSuite(CustomMBeanServerBuilderTest.class);
    return new SystemPropertyTestSetup(suite, props);
}
Also used : Test(junit.framework.Test) SimpleTest(org.apache.derbyTesting.functionTests.tests.lang.SimpleTest) SystemPropertyTestSetup(org.apache.derbyTesting.junit.SystemPropertyTestSetup) Properties(java.util.Properties)

Example 42 with SystemPropertyTestSetup

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

the class BlobMemTest method suite.

public static Test suite() {
    BaseTestSuite suite = new BaseTestSuite();
    // Just add Derby-6096 embedded as it takes time to run
    suite.addTest(new BlobMemTest("xtestderby6096BlobhashJoin"));
    suite.addTest(TestConfiguration.defaultSuite(BlobMemTest.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);
}
Also used : SystemPropertyTestSetup(org.apache.derbyTesting.junit.SystemPropertyTestSetup) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite) Properties(java.util.Properties)

Example 43 with SystemPropertyTestSetup

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

the class ConstraintCharacteristicsTest method baseSuite2.

private static Test baseSuite2(final String name) {
    final BaseTestSuite suite = new BaseTestSuite(name);
    final Properties systemProperties = new Properties();
    systemProperties.setProperty("derby.language.logQueryPlan", "true");
    suite.addTest(new SupportFilesSetup(new SystemPropertyTestSetup(new ConstraintCharacteristicsTest("testDerby6666"), systemProperties, true)));
    return suite;
}
Also used : SystemPropertyTestSetup(org.apache.derbyTesting.junit.SystemPropertyTestSetup) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite) Properties(java.util.Properties) SupportFilesSetup(org.apache.derbyTesting.junit.SupportFilesSetup)

Example 44 with SystemPropertyTestSetup

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

the class ConstraintCharacteristicsTest method baseSuite3.

// this suite holds tests that require a more optimal
// locks.waitTimeout setting.
private static Test baseSuite3(final String name) {
    final BaseTestSuite suite = new BaseTestSuite(name);
    suite.addTest(new ConstraintCharacteristicsTest("testDeferredRowsInvalidation"));
    suite.addTest(new ConstraintCharacteristicsTest("testLockingForUniquePK"));
    final Properties systemProperties = new Properties();
    systemProperties.setProperty("derby.locks.waitTimeout", Integer.toString(WAIT_TIMEOUT_DURATION));
    return new SupportFilesSetup(new SystemPropertyTestSetup(suite, systemProperties, true));
}
Also used : SystemPropertyTestSetup(org.apache.derbyTesting.junit.SystemPropertyTestSetup) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite) Properties(java.util.Properties) SupportFilesSetup(org.apache.derbyTesting.junit.SupportFilesSetup)

Example 45 with SystemPropertyTestSetup

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

the class ConstraintCharacteristicsTest method baseSuite1.

private static Test baseSuite1(final String name) {
    final BaseTestSuite suite = new BaseTestSuite(name);
    suite.addTest(new ConstraintCharacteristicsTest("testSyntaxAndBinding"));
    suite.addTest(new ConstraintCharacteristicsTest("testDropNotNullOnUniqueColumn"));
    suite.addTest(new ConstraintCharacteristicsTest("testCompressTableOKUnique"));
    suite.addTest(new ConstraintCharacteristicsTest("testLockingForUniquePKWithCommit"));
    suite.addTest(new ConstraintCharacteristicsTest("testLockingForUniquePKWithRollback"));
    suite.addTest(new ConstraintCharacteristicsTest("testDatabaseMetaData"));
    suite.addTest(new ConstraintCharacteristicsTest("testCreateConstraintDictionaryEncodings"));
    suite.addTest(new ConstraintCharacteristicsTest("testAlterConstraintDictionaryEncodings"));
    suite.addTest(new ConstraintCharacteristicsTest("testAlterConstraintInvalidation"));
    suite.addTest(new ConstraintCharacteristicsTest("testBasicDeferral"));
    suite.addTest(new ConstraintCharacteristicsTest("testRoutines"));
    suite.addTest(new ConstraintCharacteristicsTest("testImport"));
    suite.addTest(new ConstraintCharacteristicsTest("testDerby6374"));
    suite.addTest(new ConstraintCharacteristicsTest("testXA"));
    suite.addTest(new ConstraintCharacteristicsTest("testAlmostRemovedAllDups"));
    suite.addTest(new ConstraintCharacteristicsTest("testCheckConstraintsWithDeferredRows"));
    suite.addTest(new ConstraintCharacteristicsTest("testSeveralCheckConstraints"));
    suite.addTest(new ConstraintCharacteristicsTest("testDerby6670_a"));
    suite.addTest(new ConstraintCharacteristicsTest("testDerby6670_b"));
    suite.addTest(new ConstraintCharacteristicsTest("testManySimilarDuplicates"));
    suite.addTest(new ConstraintCharacteristicsTest("testDerby6773"));
    final Properties systemProperties = new Properties();
    systemProperties.setProperty("derby.locks.waitTimeout", Integer.toString(500));
    return new SupportFilesSetup(new SystemPropertyTestSetup(suite, systemProperties, true));
}
Also used : SystemPropertyTestSetup(org.apache.derbyTesting.junit.SystemPropertyTestSetup) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite) Properties(java.util.Properties) SupportFilesSetup(org.apache.derbyTesting.junit.SupportFilesSetup)

Aggregations

SystemPropertyTestSetup (org.apache.derbyTesting.junit.SystemPropertyTestSetup)55 Properties (java.util.Properties)54 BaseTestSuite (org.apache.derbyTesting.junit.BaseTestSuite)34 Test (junit.framework.Test)33 CleanDatabaseTestSetup (org.apache.derbyTesting.junit.CleanDatabaseTestSetup)20 PreparedStatement (java.sql.PreparedStatement)8 Statement (java.sql.Statement)8 SupportFilesSetup (org.apache.derbyTesting.junit.SupportFilesSetup)8 DatabasePropertyTestSetup (org.apache.derbyTesting.junit.DatabasePropertyTestSetup)6 Connection (java.sql.Connection)3 TestSetup (junit.extensions.TestSetup)3 JDBCClientSetup (org.apache.derbyTesting.junit.JDBCClientSetup)2 NetworkServerTestSetup (org.apache.derbyTesting.junit.NetworkServerTestSetup)2 SecurityManagerSetup (org.apache.derbyTesting.junit.SecurityManagerSetup)2 File (java.io.File)1 URL (java.net.URL)1 CallableStatement (java.sql.CallableStatement)1 SQLException (java.sql.SQLException)1 Locale (java.util.Locale)1 Random (java.util.Random)1