|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.integ.state.TestServiceContext
public class TestServiceContext
The context for managing the state of an integration test service. Each thread of execution driving tests manages it's own service context. Hence parallelism can be achieved while running integration tests.
Method Summary | |
---|---|
static void |
cleanup()
Action where an attempt is made to erase the contents of the working directory used by the service for various files including partition database files. |
static void |
create(InheritableSettings settings)
Action where an attempt is made to create the service. |
static void |
destroy()
Action where an attempt is made to destroy the service. |
static TestServiceContext |
get()
Gets the TestServiceContext associated with the current thread of execution. |
static void |
revert()
Action where an attempt is made to revert the service to it's initial start up state by using a previous snapshot. |
static void |
set(TestServiceContext context)
Sets the TestServiceContext for this current thread |
static void |
shutdown()
Action where an attempt is made to shutdown the service. |
static void |
startup()
Action where an attempt is made to start up the service. |
static void |
test(org.junit.internal.runners.TestClass testClass,
org.junit.internal.runners.TestMethod testMethod,
org.junit.runner.notification.RunNotifier notifier,
InheritableSettings settings)
Action where an attempt is made to run a test against the service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static TestServiceContext get()
public static void set(TestServiceContext context)
context
- the context associated with the calling threadpublic static void create(InheritableSettings settings) throws javax.naming.NamingException
settings
- the settings for this test
javax.naming.NamingException
- if we can't create the servicepublic static void destroy()
public static void cleanup() throws java.io.IOException
java.io.IOException
- on errors while deleting the working directorypublic static void startup() throws java.lang.Exception
java.lang.Exception
- on failures to start the core directory servicepublic static void shutdown() throws java.lang.Exception
java.lang.Exception
- on failures to stop the core directory servicepublic static void test(org.junit.internal.runners.TestClass testClass, org.junit.internal.runners.TestMethod testMethod, org.junit.runner.notification.RunNotifier notifier, InheritableSettings settings)
testClass
- the class whose test method is to be runtestMethod
- the test method which is to be runnotifier
- a notifier to report failures tosettings
- the inherited settings and annotations associated with
the test methodpublic static void revert() throws java.lang.Exception
java.lang.Exception
- on failures to revert the state of the core
directory service
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |