use of org.apache.derbyTesting.junit.SupportFilesSetup 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));
}
use of org.apache.derbyTesting.junit.SupportFilesSetup 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));
}
use of org.apache.derbyTesting.junit.SupportFilesSetup in project derby by apache.
the class SecurityPolicyReloadingTest method decorateTest.
// /////////////////////////////////////////////////////////////////////////////////
//
// TEST DECORATION
//
// /////////////////////////////////////////////////////////////////////////////////
/**
* Add decorators to a test run. Context is established in the reverse order
* that decorators are declared here. That is, decorators compose in reverse
* order. The order of the setup methods is:
*
* <ul>
* <li>Copy security policy to visible location.</li>
* <li>Setup authorization-enabling properties.</li>
* <li>Install a security manager.</li>
* <li>Run the tests.</li>
* </ul>
*/
private static Test decorateTest() {
Test test = new SecurityPolicyReloadingTest();
//
// Install a security manager using the initial policy file.
//
test = new SecurityManagerSetup(test, makeServerPolicyName());
//
// Set up authorization with a DBO and non-DBO user
//
test = TestConfiguration.sqlAuthorizationDecorator(test, new String[] { NON_DBO_USER }, PASSWORD_TOKEN);
//
// Copy over the initial policy file we want to use.
//
test = new SupportFilesSetup(test, null, new String[] { getSourcePolicy() }, null, new String[] { makeTargetPolicyStub() });
// No need to run with default testing policy file because we install our
// own initial policy file.
test = SecurityManagerSetup.noSecurityManager(test);
return test;
}
use of org.apache.derbyTesting.junit.SupportFilesSetup in project derby by apache.
the class TriggerGeneralTest method suite.
public static Test suite() {
Test t = TestConfiguration.defaultSuite(TriggerGeneralTest.class);
t = new SupportFilesSetup(t, new String[] { "functionTests/tests/lang/dcl_emc1.jar" });
return SecurityManagerSetup.noSecurityManager(t);
}
use of org.apache.derbyTesting.junit.SupportFilesSetup in project derby by apache.
the class SimpleJsonPermsTest method suite.
// /////////////////////////////////////////////////////////////////////////////////
//
// JUnit BEHAVIOR
//
// /////////////////////////////////////////////////////////////////////////////////
/**
* Construct top level suite in this JUnit test
*/
public static Test suite() {
BaseTestSuite suite = (BaseTestSuite) TestConfiguration.embeddedSuite(SimpleJsonPermsTest.class);
Test customTest = new SupportFilesSetup(suite, new String[] { "functionTests/tests/lang/json.dat" });
Test authenticatedTest = DatabasePropertyTestSetup.builtinAuthentication(customTest, LEGAL_USERS, "SimpleJsonPermissions");
Test authorizedTest = TestConfiguration.sqlAuthorizationDecoratorSingleUse(authenticatedTest, DB_NAME, true);
return authorizedTest;
}
Aggregations