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, wait
afterMethodRun, afterRun, beforeMethodRun, beforeRun, configure, start, stop, testCreated
protected 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
InterruptedException
public void initialize(FeaturesRunner runner)
RunnerFeature
initialize
in interface RunnerFeature
public void beforeSetup(FeaturesRunner runner)
RunnerFeature
beforeSetup
in interface RunnerFeature
public void afterTeardown(FeaturesRunner runner)
RunnerFeature
afterTeardown
in interface RunnerFeature
protected void startTransactionBefore()
protected void commitOrRollbackTransactionAfter()
Copyright © 2019 Nuxeo. All rights reserved.