use of org.apache.derbyTesting.junit.NetworkServerTestSetup in project derby by apache.
the class ServerPropertiesTest method decorateTest.
/**
* <p>
* Compose the required decorators to bring up the server in the correct
* configuration.
* </p>
*/
private static Test decorateTest(String testName, String[] startupProperties, String[] startupArgs, boolean startServer) {
ServerPropertiesTest spt = new ServerPropertiesTest(testName);
String[] startupProps;
if (startupProperties == null)
startupProps = new String[] {};
else
startupProps = startupProperties;
if (startupArgs == null)
startupArgs = new String[] {};
NetworkServerTestSetup networkServerTestSetup;
if (startServer) {
// start networkServer as a process
networkServerTestSetup = new NetworkServerTestSetup(spt, startupProps, startupArgs, true);
} else {
// get networkserver setup but don't start anything
networkServerTestSetup = new NetworkServerTestSetup(spt, true, false);
}
Test test = decorateWithPolicy(networkServerTestSetup);
test = TestConfiguration.defaultServerDecorator(test);
return test;
}
Aggregations