|
Did this page help you?Yes No Tell us about it... |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.services.simpleworkflow.flow.junit.WorkflowTestBase
public abstract class WorkflowTestBase
Constructor Summary | |
---|---|
WorkflowTestBase(DecisionContext decisionContext)
|
Method Summary | |
---|---|
Statement |
apply(Statement base,
FrameworkMethod method,
java.lang.Object target)
|
void |
clockAdvanceSeconds(long seconds)
|
void |
clockAdvanceSeconds(long seconds,
Promise<?>... waitFor)
|
double |
getClockAcceleration()
|
DecisionContext |
getDecisionContext()
|
java.lang.String |
getDefaultActivitiesTaskListToPoll()
|
WorkflowExecution |
getWorkflowExecution()
|
WorkflowType |
getWorkflowType()
|
boolean |
isDisableOutstandingTasksCheck()
|
void |
setClockAccelerationCoefficient(double clockAcceleration)
Accelerate workflow clock according the coefficient. |
void |
setClockCurrentTimeMillis(long timeMillis)
|
void |
setDefaultActivitiesTaskListToPoll(java.lang.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(java.lang.Class<? extends java.lang.Throwable> expectedException)
|
void |
setFlowTestRunner(boolean flowTestRunner)
|
void |
setTestTimeoutActualTimeMilliseconds(long timeout)
Test timeout time. |
void |
setWorkflowExecution(WorkflowExecution workflowExecution)
|
void |
setWorkflowType(WorkflowType workflowType)
|
Promise<java.lang.Void> |
waitBlocked(Promise<?>... waitFor)
Here blocked means that there are no any tasks that are ready to be executed. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorkflowTestBase(DecisionContext decisionContext)
Method Detail |
---|
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 java.lang.String getDefaultActivitiesTaskListToPoll()
public void setDefaultActivitiesTaskListToPoll(java.lang.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, java.lang.Object target)
public Promise<java.lang.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 setExpectedException(java.lang.Class<? extends java.lang.Throwable> expectedException)
public void setFlowTestRunner(boolean flowTestRunner)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |