use of org.apache.derbyTesting.junit.SystemPropertyTestSetup in project derby by apache.
the class QueryPlanTest method suite.
public static Test suite() {
// Set derby.optimizer.noTimeout to prevent the optimizer from
// timing out and returning an unexpected plan on slower machines.
// Run in embedded mode only, since we're only interested in testing
// functionality in the engine.
Properties sysprops = new Properties();
sysprops.setProperty("derby.optimizer.noTimeout", "true");
return new CleanDatabaseTestSetup(new SystemPropertyTestSetup(TestConfiguration.embeddedSuite(QueryPlanTest.class), sysprops, true));
}
use of org.apache.derbyTesting.junit.SystemPropertyTestSetup in project derby by apache.
the class NetworkServerControlApiTest method decorateSystemPropertyTests.
private static BaseTestSuite decorateSystemPropertyTests(BaseTestSuite suite) {
Properties traceProps = new Properties();
traceProps.put("derby.drda.traceDirectory", "/");
traceProps.put("derby.drda.traceAll", "true");
suite.addTest(new SystemPropertyTestSetup(TestConfiguration.clientServerDecorator(new NetworkServerControlApiTest("xtestTraceSystemPropertiesNoPermission")), traceProps));
Properties traceProps2 = new Properties();
traceProps2.put("derby.drda.traceDirectory", getSystemProperty("derby.system.home") + "/trace");
traceProps2.put("derby.drda.traceAll", "true");
suite.addTest(new SystemPropertyTestSetup(TestConfiguration.clientServerDecorator(new NetworkServerControlApiTest("xtestTraceSystemPropertiesHasPermission")), traceProps2));
return suite;
}
use of org.apache.derbyTesting.junit.SystemPropertyTestSetup in project derby by apache.
the class OutBufferedStreamTest method suite.
/**
* Returns the testsuite with a clientServerDecorator and a
* CleanDatabaseTestSetup with a table. Also sets system property
* derby.drda.streamOutBufferSize=131072.
*
* @return the testsuite
*/
public static Test suite() {
Properties properties = new Properties();
properties.setProperty("derby.drda.streamOutBufferSize", "131072");
Test suite = TestConfiguration.clientServerSuite(OutBufferedStreamTest.class);
suite = new SystemPropertyTestSetup(suite, properties);
return new CleanDatabaseTestSetup(suite) {
/**
* Creates the table used in the test case.
*
* @throws SQLException
*/
protected void decorateSQL(Statement s) throws SQLException {
/* Create a table */
s.execute("create table TEST_TABLE( TEST_COL blob( 65536 ))");
getConnection().commit();
}
};
}
use of org.apache.derbyTesting.junit.SystemPropertyTestSetup in project derby by apache.
the class ClientSideSystemPropertiesTest method suite.
/*
* Set the system properties related to client side tracing.
*/
public static Test suite() {
// Create the traceDirectory required by the tests in this class
Properties traceRelatedProperties = new Properties();
traceRelatedProperties.setProperty("derby.client.traceLevel", "64");
traceRelatedProperties.setProperty("derby.client.traceDirectory", "TraceDir");
Test suite = TestConfiguration.clientServerSuite(ClientSideSystemPropertiesTest.class);
return new SystemPropertyTestSetup(suite, traceRelatedProperties);
}
use of org.apache.derbyTesting.junit.SystemPropertyTestSetup in project derby by apache.
the class LockInterruptTest method suite.
public static Test suite() {
// Only run in embedded mode since we cannot interrupt the engine
// thread from the network client.
Test test = TestConfiguration.embeddedSuite(LockInterruptTest.class);
// Set the lock timeout to a known value so that we know what to
// expect for timeouts.
test = DatabasePropertyTestSetup.setLockTimeouts(test, DEADLOCK_TIMEOUT, LOCK_TIMEOUT);
Properties syspros = new Properties();
// Derby-4856 interrupt error create thread dump and diagnostic
// info. Add property to avoid the information.
syspros.put("derby.stream.error.extendedDiagSeverityLevel", "50000");
test = new SystemPropertyTestSetup(test, syspros, true);
return new CleanDatabaseTestSetup(test);
}
Aggregations