testing

package
v1.2.14-prerelease13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddActivityTaskCompletedEvent

func AddActivityTaskCompletedEvent(
	builder execution.MutableState,
	scheduleID int64,
	startedID int64,
	result []byte,
	identity string,
) *types.HistoryEvent

AddActivityTaskCompletedEvent adds ActivityTaskCompleted event

func AddActivityTaskFailedEvent

func AddActivityTaskFailedEvent(
	builder execution.MutableState,
	scheduleID int64,
	startedID int64,
	reason string,
	details []byte,
	identity string,
) *types.HistoryEvent

AddActivityTaskFailedEvent adds ActivityTaskFailed event

func AddActivityTaskScheduledEvent

func AddActivityTaskScheduledEvent(
	builder execution.MutableState,
	decisionCompletedID int64,
	activityID string,
	activityType string,
	taskList string,
	input []byte,
	scheduleToCloseTimeout int32,
	scheduleToStartTimeout int32,
	startToCloseTimeout int32,
	heartbeatTimeout int32,
) (*types.HistoryEvent,
	*persistence.ActivityInfo)

AddActivityTaskScheduledEvent adds ActivityTaskScheduled event

func AddActivityTaskScheduledEventWithRetry

func AddActivityTaskScheduledEventWithRetry(
	builder execution.MutableState,
	decisionCompletedID int64,
	activityID string,
	activityType string,
	taskList string,
	input []byte,
	scheduleToCloseTimeout int32,
	scheduleToStartTimeout int32,
	startToCloseTimeout int32,
	heartbeatTimeout int32,
	retryPolicy *types.RetryPolicy,
) (*types.HistoryEvent, *persistence.ActivityInfo)

AddActivityTaskScheduledEventWithRetry adds ActivityTaskScheduled event with retry policy

func AddActivityTaskStartedEvent

func AddActivityTaskStartedEvent(
	builder execution.MutableState,
	scheduleID int64,
	identity string,
) *types.HistoryEvent

AddActivityTaskStartedEvent adds ActivityTaskStarted event

func AddCancelRequestedEvent

func AddCancelRequestedEvent(
	builder execution.MutableState,
	initiatedID int64,
	domain string,
	workflowID string,
	runID string,
) *types.HistoryEvent

AddCancelRequestedEvent adds ExternalWorkflowExecutionCancelRequested event

func AddChildWorkflowExecutionCompletedEvent

func AddChildWorkflowExecutionCompletedEvent(
	builder execution.MutableState,
	initiatedID int64,
	childExecution *types.WorkflowExecution,
	attributes *types.WorkflowExecutionCompletedEventAttributes,
) *types.HistoryEvent

AddChildWorkflowExecutionCompletedEvent adds ChildWorkflowExecutionCompleted event

func AddChildWorkflowExecutionStartedEvent

func AddChildWorkflowExecutionStartedEvent(
	builder execution.MutableState,
	initiatedID int64,
	domain string,
	workflowID string,
	runID string,
	workflowType string,
) *types.HistoryEvent

AddChildWorkflowExecutionStartedEvent adds ChildWorkflowExecutionStarted event

func AddCompleteWorkflowEvent

func AddCompleteWorkflowEvent(
	builder execution.MutableState,
	decisionCompletedEventID int64,
	result []byte,
) *types.HistoryEvent

AddCompleteWorkflowEvent adds WorkflowExecutionCompleted event

func AddDecisionTaskCompletedEvent

func AddDecisionTaskCompletedEvent(
	builder execution.MutableState,
	scheduleID int64,
	startedID int64,
	context []byte,
	identity string,
) *types.HistoryEvent

AddDecisionTaskCompletedEvent adds DecisionTaskCompleted event

func AddDecisionTaskScheduledEvent

func AddDecisionTaskScheduledEvent(
	builder execution.MutableState,
) *execution.DecisionInfo

AddDecisionTaskScheduledEvent adds DecisionTaskScheduled event

func AddDecisionTaskStartedEvent

func AddDecisionTaskStartedEvent(
	builder execution.MutableState,
	scheduleID int64,
	taskList string,
	identity string,
) *types.HistoryEvent

AddDecisionTaskStartedEvent adds DecisionTaskStarted event

func AddDecisionTaskStartedEventWithRequestID

func AddDecisionTaskStartedEventWithRequestID(
	builder execution.MutableState,
	scheduleID int64,
	requestID string,
	taskList string,
	identity string,
) *types.HistoryEvent

AddDecisionTaskStartedEventWithRequestID adds DecisionTaskStarted event with requestID

func AddFailWorkflowEvent

func AddFailWorkflowEvent(
	builder execution.MutableState,
	decisionCompletedEventID int64,
	reason string,
	details []byte,
) *types.HistoryEvent

AddFailWorkflowEvent adds WorkflowExecutionFailed event

func AddRequestCancelInitiatedEvent

func AddRequestCancelInitiatedEvent(
	builder execution.MutableState,
	decisionCompletedEventID int64,
	cancelRequestID string,
	domain string,
	workflowID string,
	runID string,
) (*types.HistoryEvent, *persistence.RequestCancelInfo)

AddRequestCancelInitiatedEvent adds RequestCancelExternalWorkflowExecutionInitiated event

func AddRequestSignalInitiatedEvent

func AddRequestSignalInitiatedEvent(
	builder execution.MutableState,
	decisionCompletedEventID int64,
	signalRequestID string,
	domain string,
	workflowID string,
	runID string,
	signalName string,
	input []byte,
	control []byte,
) (*types.HistoryEvent, *persistence.SignalInfo)

AddRequestSignalInitiatedEvent adds SignalExternalWorkflowExecutionInitiated event

func AddSignaledEvent

func AddSignaledEvent(
	builder execution.MutableState,
	initiatedID int64,
	domain string,
	workflowID string,
	runID string,
	control []byte,
) *types.HistoryEvent

AddSignaledEvent adds ExternalWorkflowExecutionSignaled event

func AddStartChildWorkflowExecutionInitiatedEvent

func AddStartChildWorkflowExecutionInitiatedEvent(
	builder execution.MutableState,
	decisionCompletedID int64,
	createRequestID string,
	domain string,
	workflowID string,
	workflowType string,
	tasklist string,
	input []byte,
	executionStartToCloseTimeout int32,
	taskStartToCloseTimeout int32,
	retryPolicy *types.RetryPolicy,
) (*types.HistoryEvent,
	*persistence.ChildExecutionInfo)

AddStartChildWorkflowExecutionInitiatedEvent adds ChildWorkflowExecutionInitiated event

func AddTimerFiredEvent

func AddTimerFiredEvent(
	mutableState execution.MutableState,
	timerID string,
) *types.HistoryEvent

AddTimerFiredEvent adds TimerFired event

func AddTimerStartedEvent

func AddTimerStartedEvent(
	builder execution.MutableState,
	decisionCompletedEventID int64,
	timerID string,
	timeOut int64,
) (*types.HistoryEvent, *persistence.TimerInfo)

AddTimerStartedEvent adds TimerStarted event

func AddWorkflowExecutionStartedEvent

func AddWorkflowExecutionStartedEvent(
	builder execution.MutableState,
	workflowExecution types.WorkflowExecution,
	workflowType string,
	taskList string,
	input []byte,
	executionStartToCloseTimeout int32,
	taskStartToCloseTimeout int32,
	identity string,
) *types.HistoryEvent

AddWorkflowExecutionStartedEvent adds WorkflowExecutionStarted event

func AddWorkflowExecutionStartedEventWithParent

func AddWorkflowExecutionStartedEventWithParent(
	builder execution.MutableState,
	workflowExecution types.WorkflowExecution,
	workflowType string,
	taskList string,
	input []byte,
	executionStartToCloseTimeout,
	taskStartToCloseTimeout int32,
	parentInfo *types.ParentExecutionInfo,
	identity string,
) *types.HistoryEvent

AddWorkflowExecutionStartedEventWithParent adds WorkflowExecutionStarted event with parent workflow info

func CreatePersistenceMutableState added in v0.23.1

func CreatePersistenceMutableState(
	ms execution.MutableState,
	lastEventID int64,
	lastEventVersion int64,
) (*persistence.WorkflowMutableState, error)

CreatePersistenceMutableState generated a persistence representation of the mutable state a based on the in memory version

func SetupWorkflowWithCompletedDecision added in v0.23.1

func SetupWorkflowWithCompletedDecision(
	mockShard *shard.TestContext,
	sourceDomainID string,
) (types.WorkflowExecution, execution.MutableState, int64, error)

SetupWorkflowWithCompletedDecision setup a workflow with a completed decision task for testing purpose

func StartWorkflow added in v0.23.1

func StartWorkflow(
	mockShard *shard.TestContext,
	sourceDomainID string,
) (types.WorkflowExecution, execution.MutableState, error)

StartWorkflow setup a workflow for testing purpose

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL