public abstract class WorkflowTestBase extends Object
Constructor and Description |
---|
WorkflowTestBase(DecisionContext decisionContext) |
Modifier and Type | Method and Description |
---|---|
Statement |
apply(Statement base,
FrameworkMethod method,
Object target) |
void |
clockAdvanceSeconds(long seconds) |
void |
clockAdvanceSeconds(long seconds,
Promise<?>... waitFor) |
double |
getClockAcceleration() |
DecisionContext |
getDecisionContext() |
String |
getDefaultActivitiesTaskListToPoll() |
WorkflowExecution |
getWorkflowExecution() |
WorkflowType |
getWorkflowType() |
boolean |
isDisableOutstandingTasksCheck() |
void |
setClockAccelerationCoefficient(double clockAcceleration)
Accelerate workflow clock according the coefficient.
|
void |
setClockCurrentTimeMillis(long timeMillis) |
void |
setDefaultActivitiesTaskListToPoll(String defaultActivitiesTaskListToPoll) |
void |
setDisableOutstandingTasksCheck(boolean disableOutstandingTasksCheck)
When set to
true it is considered a test failure to have
outstanding tasks that are blocked on non external events or timers. |
void |
setExpectedException(Class<? extends Throwable> expectedException) |
void |
setFlowTestRunner(boolean flowTestRunner) |
void |
setTestTimeoutActualTimeMilliseconds(long timeout)
Test timeout time.
|
void |
setWorkflowExecution(WorkflowExecution workflowExecution) |
void |
setWorkflowType(WorkflowType workflowType) |
Promise<Void> |
waitBlocked(Promise<?>... waitFor)
Here blocked means that there are no any tasks that are ready to be
executed.
|
public WorkflowTestBase(DecisionContext decisionContext)
public boolean isDisableOutstandingTasksCheck()
public void setDisableOutstandingTasksCheck(boolean disableOutstandingTasksCheck)
true
it is considered a test failure to have
outstanding tasks that are blocked on non external events or timers. Such
blockage is usually indicates a bug that can lead to a workflow
"getting stuck". Default is true
.public DecisionContext getDecisionContext()
public void setWorkflowExecution(WorkflowExecution workflowExecution)
public void setWorkflowType(WorkflowType workflowType)
public WorkflowExecution getWorkflowExecution()
public WorkflowType getWorkflowType()
public String getDefaultActivitiesTaskListToPoll()
public void setDefaultActivitiesTaskListToPoll(String defaultActivitiesTaskListToPoll)
public double getClockAcceleration()
public void setClockAccelerationCoefficient(double clockAcceleration)
WorkflowClock
and timers
firing only. The default is 1.0 (no acceleration).clockAcceleration
- value that is larger then 1.0public Statement apply(Statement base, FrameworkMethod method, Object target)
public Promise<Void> waitBlocked(Promise<?>... waitFor)
public void setClockCurrentTimeMillis(long timeMillis)
public void clockAdvanceSeconds(long seconds)
public void clockAdvanceSeconds(long seconds, Promise<?>... waitFor)
public void setTestTimeoutActualTimeMilliseconds(long timeout)
setClockAccelerationCoefficient(double)
). Instead of calling
this method consider using FlowBlockJUnit4ClassRunner
or
FlowSpringJUnit4ClassRunner
and timeout parameter of @Test
annotation.timeout
- time in milliseconds.public void setFlowTestRunner(boolean flowTestRunner)
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.