public class BasicUnitTestManager extends java.lang.Object implements UnitTestManager, org.apache.derby.iapi.services.monitor.ModuleControl
Modifier and Type | Field and Description |
---|---|
private static boolean |
alreadyRun |
private org.apache.derby.iapi.services.context.ContextService |
contextService |
private org.apache.derby.iapi.services.stream.HeaderPrintWriter |
currentOutput |
private java.util.Hashtable<java.lang.String,java.lang.String> |
namesOfTests |
private org.apache.derby.iapi.services.stream.HeaderPrintWriter |
output |
private boolean |
performanceReportOn |
private boolean |
reportOutputOn |
private boolean |
runForever |
private int |
testDuration |
private int |
testType |
private java.util.Vector<UnitTest> |
vectorOfTests |
MODULE, RUN_FOREVER, SKIP_UNIT_TESTS
Constructor and Description |
---|
BasicUnitTestManager() |
Modifier and Type | Method and Description |
---|---|
void |
boot(boolean create,
java.util.Properties startParams) |
private static java.lang.Object |
bootServiceModule(boolean create,
java.lang.Object serviceModule,
java.lang.String factoryInterface,
java.util.Properties properties)
Privileged startup.
|
private void |
emitAMessage(java.lang.String message)
emitAMessage
Convenience routine to emit messages.
|
private void |
findTests(java.util.Properties testList,
java.util.Properties startParams) |
private static org.apache.derby.iapi.services.context.ContextService |
getContextService()
Privileged lookup of the ContextService.
|
private static org.apache.derby.iapi.services.monitor.ModuleFactory |
getMonitor()
Privileged Monitor lookup.
|
void |
registerTest(UnitTest objectToTest,
java.lang.String testName)
register an object that has the UnitTest interface,
marking what type it has and its duration.
|
private boolean |
runATest(UnitTest aTest) |
boolean |
runTests()
run the tests.
|
boolean |
runTests(int testType,
int testDuration)
Convenience function to set the test type and duration
for the UnitTestManager and then run the tests.
|
void |
setPerformanceReportOn(boolean performanceReportOn)
specify whether performance statistics should be
gathered when tests are run.
|
void |
setTestDuration(int testDuration)
the test duration is set.
|
void |
setTestType(int testType)
the test duration is set.
|
void |
stop() |
private java.util.Vector<UnitTest> vectorOfTests
private java.util.Hashtable<java.lang.String,java.lang.String> namesOfTests
private static boolean alreadyRun
private org.apache.derby.iapi.services.stream.HeaderPrintWriter output
private org.apache.derby.iapi.services.stream.HeaderPrintWriter currentOutput
private int testType
private int testDuration
private boolean reportOutputOn
private boolean performanceReportOn
private org.apache.derby.iapi.services.context.ContextService contextService
private boolean runForever
public void boot(boolean create, java.util.Properties startParams) throws org.apache.derby.iapi.error.StandardException
boot
in interface org.apache.derby.iapi.services.monitor.ModuleControl
org.apache.derby.iapi.error.StandardException
public void stop()
stop
in interface org.apache.derby.iapi.services.monitor.ModuleControl
public void registerTest(UnitTest objectToTest, java.lang.String testName)
UnitTestManager
registerTest
in interface UnitTestManager
private void findTests(java.util.Properties testList, java.util.Properties startParams)
private void emitAMessage(java.lang.String message)
for supported durations.
private boolean runATest(UnitTest aTest)
public boolean runTests()
UnitTestManager
runTests
in interface UnitTestManager
public boolean runTests(int testType, int testDuration)
UnitTestManager
runTests
in interface UnitTestManager
UnitTestConstants
public void setTestDuration(int testDuration)
UnitTestManager
setTestDuration
in interface UnitTestManager
public void setTestType(int testType)
UnitTestManager
setTestType
in interface UnitTestManager
public void setPerformanceReportOn(boolean performanceReportOn)
UnitTestManager
setPerformanceReportOn
in interface UnitTestManager
private static org.apache.derby.iapi.services.context.ContextService getContextService()
private static org.apache.derby.iapi.services.monitor.ModuleFactory getMonitor()
private static java.lang.Object bootServiceModule(boolean create, java.lang.Object serviceModule, java.lang.String factoryInterface, java.util.Properties properties) throws org.apache.derby.iapi.error.StandardException
org.apache.derby.iapi.error.StandardException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.