public class TransactionalFeature extends Object implements RunnerFeature
| Modifier and Type | Class and Description |
|---|---|
class |
TransactionalFeature.TransactionalDeployer
Handler used to commit transaction before next action and start a new one after next action if
TransactionalConfig.autoStart() is true. |
static interface |
TransactionalFeature.Waiter |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoStartTransaction |
protected boolean |
txStarted |
protected List<TransactionalFeature.Waiter> |
waiters |
| Constructor and Description |
|---|
TransactionalFeature() |
| Modifier and Type | Method and Description |
|---|---|
void |
addWaiter(TransactionalFeature.Waiter waiter) |
void |
afterTeardown(FeaturesRunner runner)
After the call of the @After methods
|
protected void |
await(TransactionalFeature.Waiter waiter,
Duration duration) |
void |
beforeSetup(FeaturesRunner runner)
Before entering in the @Before methods
|
protected void |
commitOrRollbackTransactionAfter() |
void |
initialize(FeaturesRunner runner)
Called when preparing to run the test class.
|
void |
nextTransaction() |
void |
nextTransaction(Duration duration) |
void |
nextTransaction(long duration,
TimeUnit unit)
Deprecated.
since 10.3, use
nextTransaction(Duration) instead. |
protected void |
startTransactionBefore() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterMethodRun, afterRun, beforeMethodRun, beforeRun, configure, start, stop, testCreatedprotected boolean autoStartTransaction
protected boolean txStarted
protected final List<TransactionalFeature.Waiter> waiters
public TransactionalFeature()
public void addWaiter(TransactionalFeature.Waiter waiter)
public void nextTransaction()
@Deprecated public void nextTransaction(long duration, TimeUnit unit)
nextTransaction(Duration) instead.public void nextTransaction(Duration duration)
protected void await(TransactionalFeature.Waiter waiter, Duration duration) throws InterruptedException
InterruptedExceptionpublic void initialize(FeaturesRunner runner)
RunnerFeatureinitialize in interface RunnerFeaturepublic void beforeSetup(FeaturesRunner runner)
RunnerFeaturebeforeSetup in interface RunnerFeaturepublic void afterTeardown(FeaturesRunner runner)
RunnerFeatureafterTeardown in interface RunnerFeatureprotected void startTransactionBefore()
protected void commitOrRollbackTransactionAfter()
Copyright © 2019 Nuxeo. All rights reserved.