Package org.nuxeo.runtime.test.runner
Class TransactionalFeature
java.lang.Object
org.nuxeo.runtime.test.runner.TransactionalFeature
- All Implemented Interfaces:
RunnerFeature
The transactional feature is responsible of transaction management.
It brings some API to wait for transaction
- Since:
- 10.2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassHandler used to commit transaction before next action and start a new one after next action ifTransactionalConfig.autoStart()is true.static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected final List<TransactionalFeature.Waiter> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWaiter(TransactionalFeature.Waiter waiter) voidafterTeardown(FeaturesRunner runner, org.junit.runners.model.FrameworkMethod method, Object test) After the call of the @After methodsprotected voidawait(TransactionalFeature.Waiter waiter, Duration duration) voidbeforeSetup(FeaturesRunner runner, org.junit.runners.model.FrameworkMethod method, Object test) Before entering in the @Before methodsprotected voidvoidinitialize(FeaturesRunner runner) Called when preparing to run the test class.voidvoidnextTransaction(Duration duration) protected voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.test.runner.RunnerFeature
afterMethodRun, afterRun, afterTeardown, beforeMethodRun, beforeRun, beforeSetup, configure, start, stop, testCreated
-
Field Details
-
autoStartTransaction
protected boolean autoStartTransaction -
txStarted
protected boolean txStarted -
waiters
-
-
Constructor Details
-
TransactionalFeature
public TransactionalFeature()
-
-
Method Details
-
addWaiter
-
nextTransaction
public void nextTransaction() -
nextTransaction
-
await
protected void await(TransactionalFeature.Waiter waiter, Duration duration) throws InterruptedException - Throws:
InterruptedException
-
initialize
Description copied from interface:RunnerFeatureCalled when preparing to run the test class. Framework is not started at this point. Here is time for the feature to configure the runner from annotations on the test class.- Specified by:
initializein interfaceRunnerFeature
-
beforeSetup
public void beforeSetup(FeaturesRunner runner, org.junit.runners.model.FrameworkMethod method, Object test) Description copied from interface:RunnerFeatureBefore entering in the @Before methods- Specified by:
beforeSetupin interfaceRunnerFeature
-
afterTeardown
public void afterTeardown(FeaturesRunner runner, org.junit.runners.model.FrameworkMethod method, Object test) Description copied from interface:RunnerFeatureAfter the call of the @After methods- Specified by:
afterTeardownin interfaceRunnerFeature
-
startTransactionBefore
protected void startTransactionBefore() -
commitOrRollbackTransactionAfter
protected void commitOrRollbackTransactionAfter()
-