public abstract class WorkflowTestBase
extends java.lang.Object
implements org.junit.rules.MethodRule
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected DecisionContext |
decisionContext |
protected java.lang.String |
defaultActivitiesTaskListToPoll |
protected TestWorkflowClock |
workflowClock |
protected TestWorkflowContext |
workflowContext |
| コンストラクタと説明 |
|---|
WorkflowTestBase(DecisionContext decisionContext) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected void |
afterEvaluate() |
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runners.model.FrameworkMethod method,
java.lang.Object target) |
protected void |
beforeEvaluate(DecisionContext decisionContext) |
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.
|
protected java.lang.String defaultActivitiesTaskListToPoll
protected DecisionContext decisionContext
protected TestWorkflowContext workflowContext
protected TestWorkflowClock workflowClock
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 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 org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runners.model.FrameworkMethod method,
java.lang.Object target)
apply インタフェース内 org.junit.rules.MethodRulepublic Promise<java.lang.Void> waitBlocked(Promise<?>... waitFor)
public void setClockCurrentTimeMillis(long timeMillis)
public void clockAdvanceSeconds(long seconds)
public void clockAdvanceSeconds(long seconds,
Promise<?>... waitFor)
protected void beforeEvaluate(DecisionContext decisionContext)
protected void afterEvaluate()
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)