Documentation ¶
Index ¶
- Constants
- func GenerateRandomDBName(n int) string
- type ExecutionManagerSuite
- func (s *ExecutionManagerSuite) SetupSuite()
- func (s *ExecutionManagerSuite) SetupTest()
- func (s *ExecutionManagerSuite) TearDownSuite()
- func (s *ExecutionManagerSuite) TestCancelTransferTaskTasks()
- func (s *ExecutionManagerSuite) TestContinueAsNew()
- func (s *ExecutionManagerSuite) TestCreateGetShardBackfill()
- func (s *ExecutionManagerSuite) TestCreateGetUpdateGetShard()
- func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionBrandNew()
- func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionConcurrentCreate()
- func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionRunIDReuseWithReplication()
- func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionRunIDReuseWithoutReplication()
- func (s *ExecutionManagerSuite) TestDeleteCurrentWorkflow()
- func (s *ExecutionManagerSuite) TestDeleteWorkflow()
- func (s *ExecutionManagerSuite) TestGetCurrentWorkflow()
- func (s *ExecutionManagerSuite) TestGetWorkflow()
- func (s *ExecutionManagerSuite) TestPersistenceStartWorkflow()
- func (s *ExecutionManagerSuite) TestPersistenceStartWorkflowWithReplicationState()
- func (s *ExecutionManagerSuite) TestReplicationTasks()
- func (s *ExecutionManagerSuite) TestReplicationTransferTaskTasks()
- func (s *ExecutionManagerSuite) TestResetMutableStateCurrentIsNotSelf()
- func (s *ExecutionManagerSuite) TestResetMutableStateCurrentIsSelf()
- func (s *ExecutionManagerSuite) TestSignalTransferTaskTasks()
- func (s *ExecutionManagerSuite) TestTimerTasksComplete()
- func (s *ExecutionManagerSuite) TestTimerTasksRangeComplete()
- func (s *ExecutionManagerSuite) TestTransferTasksComplete()
- func (s *ExecutionManagerSuite) TestTransferTasksRangeComplete()
- func (s *ExecutionManagerSuite) TestTransferTasksThroughUpdate()
- func (s *ExecutionManagerSuite) TestUpdateAndClearBufferedEvents()
- func (s *ExecutionManagerSuite) TestUpdateWorkflow()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateActivities()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateBufferedReplicationTasks()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateChildExecutions()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateInfo()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateRequestCancel()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateSignalInfo()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateSignalRequested()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateTimers()
- func (s *ExecutionManagerSuite) TestWorkflowReplicationState()
- type ExecutionManagerSuiteForEventsV2
- func (s *ExecutionManagerSuiteForEventsV2) SetupSuite()
- func (s *ExecutionManagerSuiteForEventsV2) SetupTest()
- func (s *ExecutionManagerSuiteForEventsV2) TearDownSuite()
- func (s *ExecutionManagerSuiteForEventsV2) TestContinueAsNew()
- func (s *ExecutionManagerSuiteForEventsV2) TestWorkflowCreation()
- func (s *ExecutionManagerSuiteForEventsV2) TestWorkflowMutableStateBufferedReplicationTasks()
- func (s *ExecutionManagerSuiteForEventsV2) TestWorkflowWithReplicationState()
- type HistoryPerfSuite
- type HistoryPersistenceSuite
- func (s *HistoryPersistenceSuite) AppendHistoryEvents(domainID string, workflowExecution gen.WorkflowExecution, ...) error
- func (s *HistoryPersistenceSuite) DeleteWorkflowExecutionHistory(domainID string, workflowExecution gen.WorkflowExecution) error
- func (s *HistoryPersistenceSuite) GetWorkflowExecutionHistory(domainID string, workflowExecution gen.WorkflowExecution, ...) (*gen.History, []byte, error)
- func (s *HistoryPersistenceSuite) SetupSuite()
- func (s *HistoryPersistenceSuite) SetupTest()
- func (s *HistoryPersistenceSuite) TearDownSuite()
- func (s *HistoryPersistenceSuite) TestAppendAndGet()
- func (s *HistoryPersistenceSuite) TestAppendAndGetByBatch()
- func (s *HistoryPersistenceSuite) TestAppendHistoryEvents()
- func (s *HistoryPersistenceSuite) TestDeleteHistoryEvents()
- func (s *HistoryPersistenceSuite) TestGetHistoryEvents()
- func (s *HistoryPersistenceSuite) TestGetHistoryEventsCompatibility()
- func (s *HistoryPersistenceSuite) TestOverwriteAndShadowingHistoryEvents()
- type HistoryV2PersistenceSuite
- func (s *HistoryV2PersistenceSuite) SetupSuite()
- func (s *HistoryV2PersistenceSuite) SetupTest()
- func (s *HistoryV2PersistenceSuite) TearDownSuite()
- func (s *HistoryV2PersistenceSuite) TestConcurrentlyCreateAndAppendBranches()
- func (s *HistoryV2PersistenceSuite) TestConcurrentlyForkAndAppendBranches()
- func (s *HistoryV2PersistenceSuite) TestGenUUIDs()
- type MatchingPersistenceSuite
- func (s *MatchingPersistenceSuite) SetupSuite()
- func (s *MatchingPersistenceSuite) SetupTest()
- func (s *MatchingPersistenceSuite) TearDownSuite()
- func (s *MatchingPersistenceSuite) TestCompleteDecisionTask()
- func (s *MatchingPersistenceSuite) TestCreateTask()
- func (s *MatchingPersistenceSuite) TestGetDecisionTasks()
- func (s *MatchingPersistenceSuite) TestLeaseAndUpdateTaskList()
- func (s *MatchingPersistenceSuite) TestLeaseAndUpdateTaskListSticky()
- type MetadataPersistenceSuite
- func (m *MetadataPersistenceSuite) CreateDomain(info *p.DomainInfo, config *p.DomainConfig, ...) (*p.CreateDomainResponse, error)
- func (m *MetadataPersistenceSuite) DeleteDomain(id, name string) error
- func (m *MetadataPersistenceSuite) GetDomain(id, name string) (*p.GetDomainResponse, error)
- func (m *MetadataPersistenceSuite) SetupSuite()
- func (m *MetadataPersistenceSuite) SetupTest()
- func (m *MetadataPersistenceSuite) TearDownSuite()
- func (m *MetadataPersistenceSuite) TestConcurrentCreateDomain()
- func (m *MetadataPersistenceSuite) TestConcurrentUpdateDomain()
- func (m *MetadataPersistenceSuite) TestCreateDomain()
- func (m *MetadataPersistenceSuite) TestDeleteDomain()
- func (m *MetadataPersistenceSuite) TestGetDomain()
- func (m *MetadataPersistenceSuite) TestUpdateDomain()
- func (m *MetadataPersistenceSuite) UpdateDomain(info *p.DomainInfo, config *p.DomainConfig, ...) error
- type MetadataPersistenceSuiteV2
- func (m *MetadataPersistenceSuiteV2) CreateDomain(info *p.DomainInfo, config *p.DomainConfig, ...) (*p.CreateDomainResponse, error)
- func (m *MetadataPersistenceSuiteV2) DeleteDomain(id, name string) error
- func (m *MetadataPersistenceSuiteV2) GetDomain(id, name string) (*p.GetDomainResponse, error)
- func (m *MetadataPersistenceSuiteV2) ListDomains(pageSize int, pageToken []byte) (*p.ListDomainsResponse, error)
- func (m *MetadataPersistenceSuiteV2) SetupSuite()
- func (m *MetadataPersistenceSuiteV2) SetupTest()
- func (m *MetadataPersistenceSuiteV2) TearDownSuite()
- func (m *MetadataPersistenceSuiteV2) TearDownTest()
- func (m *MetadataPersistenceSuiteV2) TestConcurrentCreateDomain()
- func (m *MetadataPersistenceSuiteV2) TestConcurrentUpdateDomain()
- func (m *MetadataPersistenceSuiteV2) TestCreateDomain()
- func (m *MetadataPersistenceSuiteV2) TestDeleteDomain()
- func (m *MetadataPersistenceSuiteV2) TestGetDomain()
- func (m *MetadataPersistenceSuiteV2) TestListDomains()
- func (m *MetadataPersistenceSuiteV2) TestUpdateDomain()
- func (m *MetadataPersistenceSuiteV2) UpdateDomain(info *p.DomainInfo, config *p.DomainConfig, ...) error
- type PersistenceTestCluster
- type ShardPersistenceSuite
- type TestBase
- func (s *TestBase) ClearReplicationQueue()
- func (s *TestBase) ClearTasks()
- func (s *TestBase) ClearTransferQueue()
- func (s *TestBase) CompleteReplicationTask(taskID int64) error
- func (s *TestBase) CompleteTask(domainID, taskList string, taskType int, taskID int64, ackLevel int64) error
- func (s *TestBase) CompleteTimerTask(ts time.Time, taskID int64) error
- func (s *TestBase) CompleteTransferTask(taskID int64) error
- func (s *TestBase) ContinueAsNewExecution(updatedInfo *p.WorkflowExecutionInfo, condition int64, ...) error
- func (s *TestBase) CreateActivityTasks(domainID string, workflowExecution workflow.WorkflowExecution, ...) ([]int64, error)
- func (s *TestBase) CreateChildWorkflowExecution(domainID string, workflowExecution workflow.WorkflowExecution, ...) (*p.CreateWorkflowExecutionResponse, error)
- func (s *TestBase) CreateDecisionTask(domainID string, workflowExecution workflow.WorkflowExecution, taskList string, ...) (int64, error)
- func (s *TestBase) CreateShard(shardID int, owner string, rangeID int64) error
- func (s *TestBase) CreateWorkflowExecution(domainID string, workflowExecution workflow.WorkflowExecution, ...) (*p.CreateWorkflowExecutionResponse, error)
- func (s *TestBase) CreateWorkflowExecutionManyTasks(domainID string, workflowExecution workflow.WorkflowExecution, taskList string, ...) (*p.CreateWorkflowExecutionResponse, error)
- func (s *TestBase) CreateWorkflowExecutionWithReplication(domainID string, workflowExecution workflow.WorkflowExecution, ...) (*p.CreateWorkflowExecutionResponse, error)
- func (s *TestBase) DeleteCancelState(updatedInfo *p.WorkflowExecutionInfo, condition int64, deleteCancelInfo int64) error
- func (s *TestBase) DeleteChildExecutionsState(updatedInfo *p.WorkflowExecutionInfo, condition int64, deleteChildInfo int64) error
- func (s *TestBase) DeleteSignalState(updatedInfo *p.WorkflowExecutionInfo, condition int64, deleteSignalInfo int64) error
- func (s *TestBase) DeleteSignalsRequestedState(updatedInfo *p.WorkflowExecutionInfo, condition int64, ...) error
- func (s *TestBase) DeleteWorkflowExecution(info *p.WorkflowExecutionInfo) error
- func (s *TestBase) EqualTimes(t1, t2 time.Time)
- func (s *TestBase) EqualTimesWithPrecision(t1, t2 time.Time, precision time.Duration)
- func (s *TestBase) GetCurrentWorkflowRunID(domainID, workflowID string) (string, error)
- func (s *TestBase) GetNextSequenceNumber() int64
- func (s *TestBase) GetReplicationReadLevel() int64
- func (s *TestBase) GetReplicationTasks(batchSize int, getAll bool) ([]*p.ReplicationTaskInfo, error)
- func (s *TestBase) GetShard(shardID int) (*p.ShardInfo, error)
- func (s *TestBase) GetTasks(domainID, taskList string, taskType int, batchSize int) (*p.GetTasksResponse, error)
- func (s *TestBase) GetTimerIndexTasks(batchSize int, getAll bool) ([]*p.TimerTaskInfo, error)
- func (s *TestBase) GetTransferReadLevel() int64
- func (s *TestBase) GetTransferTasks(batchSize int, getAll bool) ([]*p.TransferTaskInfo, error)
- func (s *TestBase) GetWorkflowExecutionInfo(domainID string, workflowExecution workflow.WorkflowExecution) (*p.WorkflowMutableState, error)
- func (s *TestBase) GetWorkflowExecutionInfoWithStats(domainID string, workflowExecution workflow.WorkflowExecution) (*p.MutableStateStats, *p.WorkflowMutableState, error)
- func (s *TestBase) RangeCompleteTimerTask(inclusiveBeginTimestamp time.Time, exclusiveEndTimestamp time.Time) error
- func (s *TestBase) RangeCompleteTransferTask(exclusiveBeginTaskID int64, inclusiveEndTaskID int64) error
- func (s *TestBase) ResetMutableState(prevRunID string, info *p.WorkflowExecutionInfo, ...) error
- func (s *TestBase) Setup()
- func (s *TestBase) TearDownWorkflowStore()
- func (s *TestBase) UpdateAllMutableState(updatedMutableState *p.WorkflowMutableState, condition int64) error
- func (s *TestBase) UpdateShard(updatedInfo *p.ShardInfo, previousRangeID int64) error
- func (s *TestBase) UpdateWorkflowExecution(updatedInfo *p.WorkflowExecutionInfo, decisionScheduleIDs []int64, ...) error
- func (s *TestBase) UpdateWorkflowExecutionAndFinish(updatedInfo *p.WorkflowExecutionInfo, condition int64, retentionSecond int32) error
- func (s *TestBase) UpdateWorkflowExecutionForBufferEvents(updatedInfo *p.WorkflowExecutionInfo, rState *p.ReplicationState, ...) error
- func (s *TestBase) UpdateWorkflowExecutionForChildExecutionsInitiated(updatedInfo *p.WorkflowExecutionInfo, condition int64, transferTasks []p.Task, ...) error
- func (s *TestBase) UpdateWorkflowExecutionForRequestCancel(updatedInfo *p.WorkflowExecutionInfo, condition int64, transferTasks []p.Task, ...) error
- func (s *TestBase) UpdateWorkflowExecutionForSignal(updatedInfo *p.WorkflowExecutionInfo, condition int64, transferTasks []p.Task, ...) error
- func (s *TestBase) UpdateWorkflowExecutionWithRangeID(updatedInfo *p.WorkflowExecutionInfo, decisionScheduleIDs []int64, ...) error
- func (s *TestBase) UpdateWorkflowExecutionWithReplication(updatedInfo *p.WorkflowExecutionInfo, ...) error
- func (s *TestBase) UpdateWorkflowExecutionWithTransferTasks(updatedInfo *p.WorkflowExecutionInfo, condition int64, transferTasks []p.Task, ...) error
- func (s *TestBase) UpdateWorklowStateAndReplication(updatedInfo *p.WorkflowExecutionInfo, ...) error
- func (s *TestBase) UpsertChildExecutionsState(updatedInfo *p.WorkflowExecutionInfo, condition int64, ...) error
- func (s *TestBase) UpsertRequestCancelState(updatedInfo *p.WorkflowExecutionInfo, condition int64, ...) error
- func (s *TestBase) UpsertSignalInfoState(updatedInfo *p.WorkflowExecutionInfo, condition int64, ...) error
- func (s *TestBase) UpsertSignalsRequestedState(updatedInfo *p.WorkflowExecutionInfo, condition int64, ...) error
- type TestBaseOptions
- type TestTransferTaskIDGenerator
- type TransferTaskIDGenerator
- type VisibilityPersistenceSuite
- func (s *VisibilityPersistenceSuite) SetupSuite()
- func (s *VisibilityPersistenceSuite) SetupTest()
- func (s *VisibilityPersistenceSuite) TearDownSuite()
- func (s *VisibilityPersistenceSuite) TestBasicVisibility()
- func (s *VisibilityPersistenceSuite) TestFilteringByCloseStatus()
- func (s *VisibilityPersistenceSuite) TestFilteringByType()
- func (s *VisibilityPersistenceSuite) TestFilteringByWorkflowID()
- func (s *VisibilityPersistenceSuite) TestGetClosedExecution()
- func (s *VisibilityPersistenceSuite) TestVisibilityPagination()
Constants ¶
const TimePrecision = 2 * time.Millisecond
TimePrecision is needed to account for database timestamp precision. Cassandra only provides milliseconds timestamp precision, so we need to use tolerance when doing comparison
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExecutionManagerSuite ¶
type ExecutionManagerSuite struct { TestBase // override suite.Suite.Assertions with require.Assertions; this means that s.NotNil(nil) will stop the test, // not merely log an error *require.Assertions }
ExecutionManagerSuite contains matching persistence tests
func (*ExecutionManagerSuite) SetupSuite ¶
func (s *ExecutionManagerSuite) SetupSuite()
SetupSuite implementation
func (*ExecutionManagerSuite) SetupTest ¶
func (s *ExecutionManagerSuite) SetupTest()
SetupTest implementation
func (*ExecutionManagerSuite) TearDownSuite ¶
func (s *ExecutionManagerSuite) TearDownSuite()
TearDownSuite implementation
func (*ExecutionManagerSuite) TestCancelTransferTaskTasks ¶
func (s *ExecutionManagerSuite) TestCancelTransferTaskTasks()
TestCancelTransferTaskTasks test
func (*ExecutionManagerSuite) TestContinueAsNew ¶
func (s *ExecutionManagerSuite) TestContinueAsNew()
TestContinueAsNew test
func (*ExecutionManagerSuite) TestCreateGetShardBackfill ¶
func (s *ExecutionManagerSuite) TestCreateGetShardBackfill()
TestCreateGetShardBackfill test
func (*ExecutionManagerSuite) TestCreateGetUpdateGetShard ¶
func (s *ExecutionManagerSuite) TestCreateGetUpdateGetShard()
TestCreateGetUpdateGetShard test
func (*ExecutionManagerSuite) TestCreateWorkflowExecutionBrandNew ¶
func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionBrandNew()
TestCreateWorkflowExecutionBrandNew test
func (*ExecutionManagerSuite) TestCreateWorkflowExecutionConcurrentCreate ¶
func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionConcurrentCreate()
TestCreateWorkflowExecutionConcurrentCreate test
func (*ExecutionManagerSuite) TestCreateWorkflowExecutionRunIDReuseWithReplication ¶
func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionRunIDReuseWithReplication()
TestCreateWorkflowExecutionRunIDReuseWithReplication test
func (*ExecutionManagerSuite) TestCreateWorkflowExecutionRunIDReuseWithoutReplication ¶
func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionRunIDReuseWithoutReplication()
TestCreateWorkflowExecutionRunIDReuseWithoutReplication test
func (*ExecutionManagerSuite) TestDeleteCurrentWorkflow ¶
func (s *ExecutionManagerSuite) TestDeleteCurrentWorkflow()
TestDeleteCurrentWorkflow test
func (*ExecutionManagerSuite) TestDeleteWorkflow ¶
func (s *ExecutionManagerSuite) TestDeleteWorkflow()
TestDeleteWorkflow test
func (*ExecutionManagerSuite) TestGetCurrentWorkflow ¶
func (s *ExecutionManagerSuite) TestGetCurrentWorkflow()
TestGetCurrentWorkflow test
func (*ExecutionManagerSuite) TestGetWorkflow ¶
func (s *ExecutionManagerSuite) TestGetWorkflow()
TestGetWorkflow test
func (*ExecutionManagerSuite) TestPersistenceStartWorkflow ¶
func (s *ExecutionManagerSuite) TestPersistenceStartWorkflow()
TestPersistenceStartWorkflow test
func (*ExecutionManagerSuite) TestPersistenceStartWorkflowWithReplicationState ¶
func (s *ExecutionManagerSuite) TestPersistenceStartWorkflowWithReplicationState()
TestPersistenceStartWorkflowWithReplicationState test
func (*ExecutionManagerSuite) TestReplicationTasks ¶
func (s *ExecutionManagerSuite) TestReplicationTasks()
TestReplicationTasks test
func (*ExecutionManagerSuite) TestReplicationTransferTaskTasks ¶
func (s *ExecutionManagerSuite) TestReplicationTransferTaskTasks()
TestReplicationTransferTaskTasks test
func (*ExecutionManagerSuite) TestResetMutableStateCurrentIsNotSelf ¶
func (s *ExecutionManagerSuite) TestResetMutableStateCurrentIsNotSelf()
TestResetMutableStateCurrentIsNotSelf test
func (*ExecutionManagerSuite) TestResetMutableStateCurrentIsSelf ¶
func (s *ExecutionManagerSuite) TestResetMutableStateCurrentIsSelf()
TestResetMutableStateCurrentIsSelf test
func (*ExecutionManagerSuite) TestSignalTransferTaskTasks ¶
func (s *ExecutionManagerSuite) TestSignalTransferTaskTasks()
TestSignalTransferTaskTasks test
func (*ExecutionManagerSuite) TestTimerTasksComplete ¶
func (s *ExecutionManagerSuite) TestTimerTasksComplete()
TestTimerTasksComplete test
func (*ExecutionManagerSuite) TestTimerTasksRangeComplete ¶
func (s *ExecutionManagerSuite) TestTimerTasksRangeComplete()
TestTimerTasksRangeComplete test
func (*ExecutionManagerSuite) TestTransferTasksComplete ¶
func (s *ExecutionManagerSuite) TestTransferTasksComplete()
TestTransferTasksComplete test
func (*ExecutionManagerSuite) TestTransferTasksRangeComplete ¶
func (s *ExecutionManagerSuite) TestTransferTasksRangeComplete()
TestTransferTasksRangeComplete test
func (*ExecutionManagerSuite) TestTransferTasksThroughUpdate ¶
func (s *ExecutionManagerSuite) TestTransferTasksThroughUpdate()
TestTransferTasksThroughUpdate test
func (*ExecutionManagerSuite) TestUpdateAndClearBufferedEvents ¶
func (s *ExecutionManagerSuite) TestUpdateAndClearBufferedEvents()
TestUpdateAndClearBufferedEvents test
func (*ExecutionManagerSuite) TestUpdateWorkflow ¶
func (s *ExecutionManagerSuite) TestUpdateWorkflow()
TestUpdateWorkflow test
func (*ExecutionManagerSuite) TestWorkflowMutableStateActivities ¶
func (s *ExecutionManagerSuite) TestWorkflowMutableStateActivities()
TestWorkflowMutableStateActivities test
func (*ExecutionManagerSuite) TestWorkflowMutableStateBufferedReplicationTasks ¶
func (s *ExecutionManagerSuite) TestWorkflowMutableStateBufferedReplicationTasks()
TestWorkflowMutableStateBufferedReplicationTasks test
func (*ExecutionManagerSuite) TestWorkflowMutableStateChildExecutions ¶
func (s *ExecutionManagerSuite) TestWorkflowMutableStateChildExecutions()
TestWorkflowMutableStateChildExecutions test
func (*ExecutionManagerSuite) TestWorkflowMutableStateInfo ¶
func (s *ExecutionManagerSuite) TestWorkflowMutableStateInfo()
TestWorkflowMutableStateInfo test
func (*ExecutionManagerSuite) TestWorkflowMutableStateRequestCancel ¶
func (s *ExecutionManagerSuite) TestWorkflowMutableStateRequestCancel()
TestWorkflowMutableStateRequestCancel test
func (*ExecutionManagerSuite) TestWorkflowMutableStateSignalInfo ¶
func (s *ExecutionManagerSuite) TestWorkflowMutableStateSignalInfo()
TestWorkflowMutableStateSignalInfo test
func (*ExecutionManagerSuite) TestWorkflowMutableStateSignalRequested ¶
func (s *ExecutionManagerSuite) TestWorkflowMutableStateSignalRequested()
TestWorkflowMutableStateSignalRequested test
func (*ExecutionManagerSuite) TestWorkflowMutableStateTimers ¶
func (s *ExecutionManagerSuite) TestWorkflowMutableStateTimers()
TestWorkflowMutableStateTimers test
func (*ExecutionManagerSuite) TestWorkflowReplicationState ¶
func (s *ExecutionManagerSuite) TestWorkflowReplicationState()
TestWorkflowReplicationState test
type ExecutionManagerSuiteForEventsV2 ¶ added in v0.5.0
type ExecutionManagerSuiteForEventsV2 struct { TestBase // override suite.Suite.Assertions with require.Assertions; this means that s.NotNil(nil) will stop the test, // not merely log an error *require.Assertions }
ExecutionManagerSuiteForEventsV2 contains matching persistence tests
func (*ExecutionManagerSuiteForEventsV2) SetupSuite ¶ added in v0.5.0
func (s *ExecutionManagerSuiteForEventsV2) SetupSuite()
SetupSuite implementation
func (*ExecutionManagerSuiteForEventsV2) SetupTest ¶ added in v0.5.0
func (s *ExecutionManagerSuiteForEventsV2) SetupTest()
SetupTest implementation
func (*ExecutionManagerSuiteForEventsV2) TearDownSuite ¶ added in v0.5.0
func (s *ExecutionManagerSuiteForEventsV2) TearDownSuite()
TearDownSuite implementation
func (*ExecutionManagerSuiteForEventsV2) TestContinueAsNew ¶ added in v0.5.0
func (s *ExecutionManagerSuiteForEventsV2) TestContinueAsNew()
TestContinueAsNew test
func (*ExecutionManagerSuiteForEventsV2) TestWorkflowCreation ¶ added in v0.5.0
func (s *ExecutionManagerSuiteForEventsV2) TestWorkflowCreation()
TestWorkflowCreation test
func (*ExecutionManagerSuiteForEventsV2) TestWorkflowMutableStateBufferedReplicationTasks ¶ added in v0.5.0
func (s *ExecutionManagerSuiteForEventsV2) TestWorkflowMutableStateBufferedReplicationTasks()
TestWorkflowMutableStateBufferedReplicationTasks test
func (*ExecutionManagerSuiteForEventsV2) TestWorkflowWithReplicationState ¶ added in v0.5.0
func (s *ExecutionManagerSuiteForEventsV2) TestWorkflowWithReplicationState()
TestWorkflowWithReplicationState test
type HistoryPerfSuite ¶ added in v0.5.0
type HistoryPerfSuite struct { suite.Suite TestBase // override suite.Suite.Assertions with require.Assertions; this means that s.NotNil(nil) will stop the test, // not merely log an error *require.Assertions }
HistoryPerfSuite contains history persistence tests
func (*HistoryPerfSuite) SetupSuite ¶ added in v0.5.0
func (s *HistoryPerfSuite) SetupSuite()
SetupSuite implementation
func (*HistoryPerfSuite) SetupTest ¶ added in v0.5.0
func (s *HistoryPerfSuite) SetupTest()
SetupTest implementation
func (*HistoryPerfSuite) TearDownSuite ¶ added in v0.5.0
func (s *HistoryPerfSuite) TearDownSuite()
TearDownSuite implementation
func (*HistoryPerfSuite) TestPerf ¶ added in v0.5.0
func (s *HistoryPerfSuite) TestPerf()
TestPerf is the test entry === RUN TestCassandraHistoryPerformance/TestPerf appendV1-batch size: 1 , time eslapsed: 3454.098 milliseconds appendV2-batch size: 1 , time eslapsed: 1022.303 milliseconds appendV1-batch size: 2 , time eslapsed: 1579.684 milliseconds appendV2-batch size: 2 , time eslapsed: 457.522 milliseconds appendV1-batch size: 5 , time eslapsed: 627.084 milliseconds appendV2-batch size: 5 , time eslapsed: 191.902 milliseconds appendV1-batch size: 10 , time eslapsed: 324.444 milliseconds appendV2-batch size: 10 , time eslapsed: 106.51 milliseconds appendV1-batch size: 100 , time eslapsed: 45.617 milliseconds appendV2-batch size: 100 , time eslapsed: 18.488 milliseconds appendV1-batch size: 500 , time eslapsed: 28.697 milliseconds appendV2-batch size: 500 , time eslapsed: 14.168 milliseconds appendV1-batch size: 1000 , time eslapsed: 28.188 milliseconds appendV2-batch size: 1000 , time eslapsed: 12.643 milliseconds readV1-batch size: 1 , time eslapsed: 31.842 milliseconds readv2-batch size: 1 , time eslapsed: 23.431 milliseconds readV1-batch size: 2 , time eslapsed: 26.428 milliseconds readv2-batch size: 2 , time eslapsed: 19.373 milliseconds readV1-batch size: 5 , time eslapsed: 18.031 milliseconds readv2-batch size: 5 , time eslapsed: 11.139 milliseconds readV1-batch size: 10 , time eslapsed: 13.673 milliseconds readv2-batch size: 10 , time eslapsed: 8.602 milliseconds readV1-batch size: 100 , time eslapsed: 11.497 milliseconds readv2-batch size: 100 , time eslapsed: 6.315 milliseconds readV1-batch size: 500 , time eslapsed: 11.975 milliseconds readv2-batch size: 500 , time eslapsed: 5.927 milliseconds readV1-batch size: 1000 , time eslapsed: 9.965 milliseconds readv2-batch size: 1000 , time eslapsed: 5.758 milliseconds time="2018-10-21T19:33:02-07:00" level=info msg="dropped namespace" keyspace=test_wofofrfwrw --- PASS: TestCassandraHistoryPerformance (10.07s)
--- PASS: TestCassandraHistoryPerformance/TestPerf (8.13s)
PASS
type HistoryPersistenceSuite ¶
type HistoryPersistenceSuite struct { TestBase // override suite.Suite.Assertions with require.Assertions; this means that s.NotNil(nil) will stop the test, // not merely log an error *require.Assertions }
HistoryPersistenceSuite contains history persistence tests
func (*HistoryPersistenceSuite) AppendHistoryEvents ¶
func (s *HistoryPersistenceSuite) AppendHistoryEvents(domainID string, workflowExecution gen.WorkflowExecution, firstEventID, eventBatchVersion int64, rangeID, txID int64, eventsBatch *gen.History, overwrite bool) error
AppendHistoryEvents helper
func (*HistoryPersistenceSuite) DeleteWorkflowExecutionHistory ¶
func (s *HistoryPersistenceSuite) DeleteWorkflowExecutionHistory(domainID string, workflowExecution gen.WorkflowExecution) error
DeleteWorkflowExecutionHistory helper
func (*HistoryPersistenceSuite) GetWorkflowExecutionHistory ¶
func (s *HistoryPersistenceSuite) GetWorkflowExecutionHistory(domainID string, workflowExecution gen.WorkflowExecution, firstEventID, nextEventID int64, pageSize int, token []byte) (*gen.History, []byte, error)
GetWorkflowExecutionHistory helper
func (*HistoryPersistenceSuite) SetupSuite ¶
func (s *HistoryPersistenceSuite) SetupSuite()
SetupSuite implementation
func (*HistoryPersistenceSuite) SetupTest ¶
func (s *HistoryPersistenceSuite) SetupTest()
SetupTest implementation
func (*HistoryPersistenceSuite) TearDownSuite ¶
func (s *HistoryPersistenceSuite) TearDownSuite()
TearDownSuite implementation
func (*HistoryPersistenceSuite) TestAppendAndGet ¶
func (s *HistoryPersistenceSuite) TestAppendAndGet()
TestAppendAndGet test
func (*HistoryPersistenceSuite) TestAppendAndGetByBatch ¶ added in v0.5.0
func (s *HistoryPersistenceSuite) TestAppendAndGetByBatch()
TestAppendAndGetByBatch test
func (*HistoryPersistenceSuite) TestAppendHistoryEvents ¶
func (s *HistoryPersistenceSuite) TestAppendHistoryEvents()
TestAppendHistoryEvents test
func (*HistoryPersistenceSuite) TestDeleteHistoryEvents ¶
func (s *HistoryPersistenceSuite) TestDeleteHistoryEvents()
TestDeleteHistoryEvents test
func (*HistoryPersistenceSuite) TestGetHistoryEvents ¶
func (s *HistoryPersistenceSuite) TestGetHistoryEvents()
TestGetHistoryEvents test
func (*HistoryPersistenceSuite) TestGetHistoryEventsCompatibility ¶
func (s *HistoryPersistenceSuite) TestGetHistoryEventsCompatibility()
TestGetHistoryEventsCompatibility test
func (*HistoryPersistenceSuite) TestOverwriteAndShadowingHistoryEvents ¶
func (s *HistoryPersistenceSuite) TestOverwriteAndShadowingHistoryEvents()
TestOverwriteAndShadowingHistoryEvents test
type HistoryV2PersistenceSuite ¶ added in v0.5.0
type HistoryV2PersistenceSuite struct { suite.Suite TestBase // override suite.Suite.Assertions with require.Assertions; this means that s.NotNil(nil) will stop the test, // not merely log an error *require.Assertions }
HistoryV2PersistenceSuite contains history persistence tests
func (*HistoryV2PersistenceSuite) SetupSuite ¶ added in v0.5.0
func (s *HistoryV2PersistenceSuite) SetupSuite()
SetupSuite implementation
func (*HistoryV2PersistenceSuite) SetupTest ¶ added in v0.5.0
func (s *HistoryV2PersistenceSuite) SetupTest()
SetupTest implementation
func (*HistoryV2PersistenceSuite) TearDownSuite ¶ added in v0.5.0
func (s *HistoryV2PersistenceSuite) TearDownSuite()
TearDownSuite implementation
func (*HistoryV2PersistenceSuite) TestConcurrentlyCreateAndAppendBranches ¶ added in v0.5.0
func (s *HistoryV2PersistenceSuite) TestConcurrentlyCreateAndAppendBranches()
TestConcurrentlyCreateAndAppendBranches test
func (*HistoryV2PersistenceSuite) TestConcurrentlyForkAndAppendBranches ¶ added in v0.5.0
func (s *HistoryV2PersistenceSuite) TestConcurrentlyForkAndAppendBranches()
TestConcurrentlyForkAndAppendBranches test
func (*HistoryV2PersistenceSuite) TestGenUUIDs ¶ added in v0.5.0
func (s *HistoryV2PersistenceSuite) TestGenUUIDs()
TestGenUUIDs testing uuid.New() can generate unique UUID
type MatchingPersistenceSuite ¶
type MatchingPersistenceSuite struct { TestBase // override suite.Suite.Assertions with require.Assertions; this means that s.NotNil(nil) will stop the test, // not merely log an error *require.Assertions }
MatchingPersistenceSuite contains matching persistence tests
func (*MatchingPersistenceSuite) SetupSuite ¶
func (s *MatchingPersistenceSuite) SetupSuite()
SetupSuite implementation
func (*MatchingPersistenceSuite) SetupTest ¶
func (s *MatchingPersistenceSuite) SetupTest()
SetupTest implementation
func (*MatchingPersistenceSuite) TearDownSuite ¶
func (s *MatchingPersistenceSuite) TearDownSuite()
TearDownSuite implementation
func (*MatchingPersistenceSuite) TestCompleteDecisionTask ¶
func (s *MatchingPersistenceSuite) TestCompleteDecisionTask()
TestCompleteDecisionTask test
func (*MatchingPersistenceSuite) TestCreateTask ¶
func (s *MatchingPersistenceSuite) TestCreateTask()
TestCreateTask test
func (*MatchingPersistenceSuite) TestGetDecisionTasks ¶
func (s *MatchingPersistenceSuite) TestGetDecisionTasks()
TestGetDecisionTasks test
func (*MatchingPersistenceSuite) TestLeaseAndUpdateTaskList ¶
func (s *MatchingPersistenceSuite) TestLeaseAndUpdateTaskList()
TestLeaseAndUpdateTaskList test
func (*MatchingPersistenceSuite) TestLeaseAndUpdateTaskListSticky ¶
func (s *MatchingPersistenceSuite) TestLeaseAndUpdateTaskListSticky()
TestLeaseAndUpdateTaskListSticky test
type MetadataPersistenceSuite ¶
type MetadataPersistenceSuite struct { TestBase // override suite.Suite.Assertions with require.Assertions; this means that s.NotNil(nil) will stop the test, // not merely log an error *require.Assertions }
MetadataPersistenceSuite contains metadata persistence tests
func (*MetadataPersistenceSuite) CreateDomain ¶
func (m *MetadataPersistenceSuite) CreateDomain(info *p.DomainInfo, config *p.DomainConfig, replicationConfig *p.DomainReplicationConfig, isGlobaldomain bool, configVersion int64, failoverVersion int64) (*p.CreateDomainResponse, error)
CreateDomain helper
func (*MetadataPersistenceSuite) DeleteDomain ¶
func (m *MetadataPersistenceSuite) DeleteDomain(id, name string) error
DeleteDomain helper
func (*MetadataPersistenceSuite) GetDomain ¶
func (m *MetadataPersistenceSuite) GetDomain(id, name string) (*p.GetDomainResponse, error)
GetDomain helper
func (*MetadataPersistenceSuite) SetupSuite ¶
func (m *MetadataPersistenceSuite) SetupSuite()
SetupSuite implementation
func (*MetadataPersistenceSuite) SetupTest ¶
func (m *MetadataPersistenceSuite) SetupTest()
SetupTest implementation
func (*MetadataPersistenceSuite) TearDownSuite ¶
func (m *MetadataPersistenceSuite) TearDownSuite()
TearDownSuite implementation
func (*MetadataPersistenceSuite) TestConcurrentCreateDomain ¶
func (m *MetadataPersistenceSuite) TestConcurrentCreateDomain()
TestConcurrentCreateDomain test
func (*MetadataPersistenceSuite) TestConcurrentUpdateDomain ¶
func (m *MetadataPersistenceSuite) TestConcurrentUpdateDomain()
TestConcurrentUpdateDomain test
func (*MetadataPersistenceSuite) TestCreateDomain ¶
func (m *MetadataPersistenceSuite) TestCreateDomain()
TestCreateDomain test
func (*MetadataPersistenceSuite) TestDeleteDomain ¶
func (m *MetadataPersistenceSuite) TestDeleteDomain()
TestDeleteDomain test
func (*MetadataPersistenceSuite) TestGetDomain ¶
func (m *MetadataPersistenceSuite) TestGetDomain()
TestGetDomain test
func (*MetadataPersistenceSuite) TestUpdateDomain ¶
func (m *MetadataPersistenceSuite) TestUpdateDomain()
TestUpdateDomain test
func (*MetadataPersistenceSuite) UpdateDomain ¶
func (m *MetadataPersistenceSuite) UpdateDomain(info *p.DomainInfo, config *p.DomainConfig, replicationConfig *p.DomainReplicationConfig, configVersion int64, failoverVersion int64, dbVersion int64) error
UpdateDomain helper
type MetadataPersistenceSuiteV2 ¶
type MetadataPersistenceSuiteV2 struct { TestBase // override suite.Suite.Assertions with require.Assertions; this means that s.NotNil(nil) will stop the test, // not merely log an error *require.Assertions }
MetadataPersistenceSuiteV2 is test of the V2 version of metadata persistence
func (*MetadataPersistenceSuiteV2) CreateDomain ¶
func (m *MetadataPersistenceSuiteV2) CreateDomain(info *p.DomainInfo, config *p.DomainConfig, replicationConfig *p.DomainReplicationConfig, isGlobaldomain bool, configVersion int64, failoverVersion int64) (*p.CreateDomainResponse, error)
CreateDomain helper method
func (*MetadataPersistenceSuiteV2) DeleteDomain ¶
func (m *MetadataPersistenceSuiteV2) DeleteDomain(id, name string) error
DeleteDomain helper method
func (*MetadataPersistenceSuiteV2) GetDomain ¶
func (m *MetadataPersistenceSuiteV2) GetDomain(id, name string) (*p.GetDomainResponse, error)
GetDomain helper method
func (*MetadataPersistenceSuiteV2) ListDomains ¶
func (m *MetadataPersistenceSuiteV2) ListDomains(pageSize int, pageToken []byte) (*p.ListDomainsResponse, error)
ListDomains helper method
func (*MetadataPersistenceSuiteV2) SetupSuite ¶
func (m *MetadataPersistenceSuiteV2) SetupSuite()
SetupSuite implementation
func (*MetadataPersistenceSuiteV2) SetupTest ¶
func (m *MetadataPersistenceSuiteV2) SetupTest()
SetupTest implementation
func (*MetadataPersistenceSuiteV2) TearDownSuite ¶
func (m *MetadataPersistenceSuiteV2) TearDownSuite()
TearDownSuite implementation
func (*MetadataPersistenceSuiteV2) TearDownTest ¶
func (m *MetadataPersistenceSuiteV2) TearDownTest()
TearDownTest implementation
func (*MetadataPersistenceSuiteV2) TestConcurrentCreateDomain ¶
func (m *MetadataPersistenceSuiteV2) TestConcurrentCreateDomain()
TestConcurrentCreateDomain test
func (*MetadataPersistenceSuiteV2) TestConcurrentUpdateDomain ¶
func (m *MetadataPersistenceSuiteV2) TestConcurrentUpdateDomain()
TestConcurrentUpdateDomain test
func (*MetadataPersistenceSuiteV2) TestCreateDomain ¶
func (m *MetadataPersistenceSuiteV2) TestCreateDomain()
TestCreateDomain test
func (*MetadataPersistenceSuiteV2) TestDeleteDomain ¶
func (m *MetadataPersistenceSuiteV2) TestDeleteDomain()
TestDeleteDomain test
func (*MetadataPersistenceSuiteV2) TestGetDomain ¶
func (m *MetadataPersistenceSuiteV2) TestGetDomain()
TestGetDomain test
func (*MetadataPersistenceSuiteV2) TestListDomains ¶
func (m *MetadataPersistenceSuiteV2) TestListDomains()
TestListDomains test
func (*MetadataPersistenceSuiteV2) TestUpdateDomain ¶
func (m *MetadataPersistenceSuiteV2) TestUpdateDomain()
TestUpdateDomain test
func (*MetadataPersistenceSuiteV2) UpdateDomain ¶
func (m *MetadataPersistenceSuiteV2) UpdateDomain(info *p.DomainInfo, config *p.DomainConfig, replicationConfig *p.DomainReplicationConfig, configVersion int64, failoverVersion int64, failoverNotificationVersion int64, notificationVersion int64) error
UpdateDomain helper method
type PersistenceTestCluster ¶
type PersistenceTestCluster interface { DatabaseName() string SetupTestDatabase() TearDownTestDatabase() CreateSession() DropDatabase() Config() config.Persistence LoadSchema(fileNames []string, schemaDir string) LoadVisibilitySchema(fileNames []string, schemaDir string) }
PersistenceTestCluster exposes management operations on a database
type ShardPersistenceSuite ¶
type ShardPersistenceSuite struct { TestBase // override suite.Suite.Assertions with require.Assertions; this means that s.NotNil(nil) will stop the test, // not merely log an error *require.Assertions }
ShardPersistenceSuite contains shard persistence tests
func (*ShardPersistenceSuite) SetupSuite ¶
func (s *ShardPersistenceSuite) SetupSuite()
SetupSuite implementation
func (*ShardPersistenceSuite) SetupTest ¶
func (s *ShardPersistenceSuite) SetupTest()
SetupTest implementation
func (*ShardPersistenceSuite) TearDownSuite ¶
func (s *ShardPersistenceSuite) TearDownSuite()
TearDownSuite implementation
func (*ShardPersistenceSuite) TestCreateShard ¶
func (s *ShardPersistenceSuite) TestCreateShard()
TestCreateShard test
func (*ShardPersistenceSuite) TestGetShard ¶
func (s *ShardPersistenceSuite) TestGetShard()
TestGetShard test
func (*ShardPersistenceSuite) TestUpdateShard ¶
func (s *ShardPersistenceSuite) TestUpdateShard()
TestUpdateShard test
type TestBase ¶
type TestBase struct { suite.Suite ShardMgr p.ShardManager ExecutionMgrFactory pfactory.Factory ExecutionManager p.ExecutionManager TaskMgr p.TaskManager HistoryMgr p.HistoryManager HistoryV2Mgr p.HistoryV2Manager MetadataManager p.MetadataManager MetadataManagerV2 p.MetadataManager MetadataProxy p.MetadataManager VisibilityMgr p.VisibilityManager ShardInfo *p.ShardInfo TaskIDGenerator TransferTaskIDGenerator ClusterMetadata cluster.Metadata ReadLevel int64 ReplicationReadLevel int64 DefaultTestCluster PersistenceTestCluster VisibilityTestCluster PersistenceTestCluster }
TestBase wraps the base setup needed to create workflows over persistence layer.
func NewTestBaseWithCassandra ¶
func NewTestBaseWithCassandra(options *TestBaseOptions) TestBase
NewTestBaseWithCassandra returns a persistence test base backed by cassandra datastore
func NewTestBaseWithSQL ¶
func NewTestBaseWithSQL(options *TestBaseOptions) TestBase
NewTestBaseWithSQL returns a new persistence test base backed by SQL
func (*TestBase) ClearReplicationQueue ¶
func (s *TestBase) ClearReplicationQueue()
ClearReplicationQueue completes all tasks in replication queue
func (*TestBase) ClearTasks ¶
func (s *TestBase) ClearTasks()
ClearTasks completes all transfer tasks and replication tasks
func (*TestBase) ClearTransferQueue ¶
func (s *TestBase) ClearTransferQueue()
ClearTransferQueue completes all tasks in transfer queue
func (*TestBase) CompleteReplicationTask ¶
CompleteReplicationTask is a utility method to complete a replication task
func (*TestBase) CompleteTask ¶
func (s *TestBase) CompleteTask(domainID, taskList string, taskType int, taskID int64, ackLevel int64) error
CompleteTask is a utility method to complete a task
func (*TestBase) CompleteTimerTask ¶
CompleteTimerTask is a utility method to complete a timer task
func (*TestBase) CompleteTransferTask ¶
CompleteTransferTask is a utility method to complete a transfer task
func (*TestBase) ContinueAsNewExecution ¶
func (s *TestBase) ContinueAsNewExecution(updatedInfo *p.WorkflowExecutionInfo, condition int64, newExecution workflow.WorkflowExecution, nextEventID, decisionScheduleID int64) error
ContinueAsNewExecution is a utility method to create workflow executions
func (*TestBase) CreateActivityTasks ¶
func (s *TestBase) CreateActivityTasks(domainID string, workflowExecution workflow.WorkflowExecution, activities map[int64]string) ([]int64, error)
CreateActivityTasks is a utility method to create tasks
func (*TestBase) CreateChildWorkflowExecution ¶
func (s *TestBase) CreateChildWorkflowExecution(domainID string, workflowExecution workflow.WorkflowExecution, parentDomainID string, parentExecution *workflow.WorkflowExecution, initiatedID int64, taskList, wType string, wTimeout int32, decisionTimeout int32, executionContext []byte, nextEventID int64, lastProcessedEventID int64, decisionScheduleID int64, timerTasks []p.Task) (*p.CreateWorkflowExecutionResponse, error)
CreateChildWorkflowExecution is a utility method to create child workflow executions
func (*TestBase) CreateDecisionTask ¶
func (s *TestBase) CreateDecisionTask(domainID string, workflowExecution workflow.WorkflowExecution, taskList string, decisionScheduleID int64) (int64, error)
CreateDecisionTask is a utility method to create a task
func (*TestBase) CreateShard ¶
CreateShard is a utility method to create the shard using persistence layer
func (*TestBase) CreateWorkflowExecution ¶
func (s *TestBase) CreateWorkflowExecution(domainID string, workflowExecution workflow.WorkflowExecution, taskList, wType string, wTimeout int32, decisionTimeout int32, executionContext []byte, nextEventID int64, lastProcessedEventID int64, decisionScheduleID int64, timerTasks []p.Task) (*p.CreateWorkflowExecutionResponse, error)
CreateWorkflowExecution is a utility method to create workflow executions
func (*TestBase) CreateWorkflowExecutionManyTasks ¶
func (s *TestBase) CreateWorkflowExecutionManyTasks(domainID string, workflowExecution workflow.WorkflowExecution, taskList string, executionContext []byte, nextEventID int64, lastProcessedEventID int64, decisionScheduleIDs []int64, activityScheduleIDs []int64) (*p.CreateWorkflowExecutionResponse, error)
CreateWorkflowExecutionManyTasks is a utility method to create workflow executions
func (*TestBase) CreateWorkflowExecutionWithReplication ¶
func (s *TestBase) CreateWorkflowExecutionWithReplication(domainID string, workflowExecution workflow.WorkflowExecution, taskList, wType string, wTimeout int32, decisionTimeout int32, nextEventID int64, lastProcessedEventID int64, decisionScheduleID int64, state *p.ReplicationState, txTasks []p.Task) (*p.CreateWorkflowExecutionResponse, error)
CreateWorkflowExecutionWithReplication is a utility method to create workflow executions
func (*TestBase) DeleteCancelState ¶
func (s *TestBase) DeleteCancelState(updatedInfo *p.WorkflowExecutionInfo, condition int64, deleteCancelInfo int64) error
DeleteCancelState is a utility method to delete request cancel state from mutable state
func (*TestBase) DeleteChildExecutionsState ¶
func (s *TestBase) DeleteChildExecutionsState(updatedInfo *p.WorkflowExecutionInfo, condition int64, deleteChildInfo int64) error
DeleteChildExecutionsState is a utility method to delete child execution from mutable state
func (*TestBase) DeleteSignalState ¶
func (s *TestBase) DeleteSignalState(updatedInfo *p.WorkflowExecutionInfo, condition int64, deleteSignalInfo int64) error
DeleteSignalState is a utility method to delete request cancel state from mutable state
func (*TestBase) DeleteSignalsRequestedState ¶
func (s *TestBase) DeleteSignalsRequestedState(updatedInfo *p.WorkflowExecutionInfo, condition int64, deleteSignalsRequestedID string) error
DeleteSignalsRequestedState is a utility method to delete mutable state of workflow execution
func (*TestBase) DeleteWorkflowExecution ¶
func (s *TestBase) DeleteWorkflowExecution(info *p.WorkflowExecutionInfo) error
DeleteWorkflowExecution is a utility method to delete a workflow execution
func (*TestBase) EqualTimes ¶
EqualTimes assertion that two times are equal within two millisecond precision
func (*TestBase) EqualTimesWithPrecision ¶
EqualTimesWithPrecision assertion that two times are equal within precision
func (*TestBase) GetCurrentWorkflowRunID ¶
GetCurrentWorkflowRunID returns the workflow run ID for the given params
func (*TestBase) GetNextSequenceNumber ¶
GetNextSequenceNumber generates a unique sequence number for can be used for transfer queue taskId
func (*TestBase) GetReplicationReadLevel ¶
GetReplicationReadLevel returns the current read level for shard
func (*TestBase) GetReplicationTasks ¶
func (s *TestBase) GetReplicationTasks(batchSize int, getAll bool) ([]*p.ReplicationTaskInfo, error)
GetReplicationTasks is a utility method to get tasks from replication task queue
func (*TestBase) GetTasks ¶
func (s *TestBase) GetTasks(domainID, taskList string, taskType int, batchSize int) (*p.GetTasksResponse, error)
GetTasks is a utility method to get tasks from persistence
func (*TestBase) GetTimerIndexTasks ¶
GetTimerIndexTasks is a utility method to get tasks from transfer task queue
func (*TestBase) GetTransferReadLevel ¶
GetTransferReadLevel returns the current read level for shard
func (*TestBase) GetTransferTasks ¶
GetTransferTasks is a utility method to get tasks from transfer task queue
func (*TestBase) GetWorkflowExecutionInfo ¶
func (s *TestBase) GetWorkflowExecutionInfo(domainID string, workflowExecution workflow.WorkflowExecution) ( *p.WorkflowMutableState, error)
GetWorkflowExecutionInfo is a utility method to retrieve execution info
func (*TestBase) GetWorkflowExecutionInfoWithStats ¶
func (s *TestBase) GetWorkflowExecutionInfoWithStats(domainID string, workflowExecution workflow.WorkflowExecution) ( *p.MutableStateStats, *p.WorkflowMutableState, error)
GetWorkflowExecutionInfoWithStats is a utility method to retrieve execution info with size stats
func (*TestBase) RangeCompleteTimerTask ¶
func (s *TestBase) RangeCompleteTimerTask(inclusiveBeginTimestamp time.Time, exclusiveEndTimestamp time.Time) error
RangeCompleteTimerTask is a utility method to complete a range of timer tasks
func (*TestBase) RangeCompleteTransferTask ¶
func (s *TestBase) RangeCompleteTransferTask(exclusiveBeginTaskID int64, inclusiveEndTaskID int64) error
RangeCompleteTransferTask is a utility method to complete a range of transfer tasks
func (*TestBase) ResetMutableState ¶
func (s *TestBase) ResetMutableState(prevRunID string, info *p.WorkflowExecutionInfo, replicationState *p.ReplicationState, nextEventID int64, activityInfos []*p.ActivityInfo, timerInfos []*p.TimerInfo, childExecutionInfos []*p.ChildExecutionInfo, requestCancelInfos []*p.RequestCancelInfo, signalInfos []*p.SignalInfo, ids []string) error
ResetMutableState is utility method to reset mutable state
func (*TestBase) Setup ¶
func (s *TestBase) Setup()
Setup sets up the test base, must be called as part of SetupSuite
func (*TestBase) TearDownWorkflowStore ¶
func (s *TestBase) TearDownWorkflowStore()
TearDownWorkflowStore to cleanup
func (*TestBase) UpdateAllMutableState ¶
func (s *TestBase) UpdateAllMutableState(updatedMutableState *p.WorkflowMutableState, condition int64) error
UpdateAllMutableState is a utility method to update workflow execution
func (*TestBase) UpdateShard ¶
UpdateShard is a utility method to update the shard using persistence layer
func (*TestBase) UpdateWorkflowExecution ¶
func (s *TestBase) UpdateWorkflowExecution(updatedInfo *p.WorkflowExecutionInfo, decisionScheduleIDs []int64, activityScheduleIDs []int64, condition int64, timerTasks []p.Task, deleteTimerTask p.Task, upsertActivityInfos []*p.ActivityInfo, deleteActivityInfos []int64, upsertTimerInfos []*p.TimerInfo, deleteTimerInfos []string) error
UpdateWorkflowExecution is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionAndFinish ¶
func (s *TestBase) UpdateWorkflowExecutionAndFinish(updatedInfo *p.WorkflowExecutionInfo, condition int64, retentionSecond int32) error
UpdateWorkflowExecutionAndFinish is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionForBufferEvents ¶
func (s *TestBase) UpdateWorkflowExecutionForBufferEvents( updatedInfo *p.WorkflowExecutionInfo, rState *p.ReplicationState, condition int64, bufferEvents []*workflow.HistoryEvent, clearBufferedEvents bool) error
UpdateWorkflowExecutionForBufferEvents is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionForChildExecutionsInitiated ¶
func (s *TestBase) UpdateWorkflowExecutionForChildExecutionsInitiated( updatedInfo *p.WorkflowExecutionInfo, condition int64, transferTasks []p.Task, childInfos []*p.ChildExecutionInfo) error
UpdateWorkflowExecutionForChildExecutionsInitiated is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionForRequestCancel ¶
func (s *TestBase) UpdateWorkflowExecutionForRequestCancel( updatedInfo *p.WorkflowExecutionInfo, condition int64, transferTasks []p.Task, upsertRequestCancelInfo []*p.RequestCancelInfo) error
UpdateWorkflowExecutionForRequestCancel is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionForSignal ¶
func (s *TestBase) UpdateWorkflowExecutionForSignal( updatedInfo *p.WorkflowExecutionInfo, condition int64, transferTasks []p.Task, upsertSignalInfos []*p.SignalInfo) error
UpdateWorkflowExecutionForSignal is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionWithRangeID ¶
func (s *TestBase) UpdateWorkflowExecutionWithRangeID(updatedInfo *p.WorkflowExecutionInfo, decisionScheduleIDs []int64, activityScheduleIDs []int64, rangeID, condition int64, timerTasks []p.Task, deleteTimerTask p.Task, upsertActivityInfos []*p.ActivityInfo, deleteActivityInfos []int64, upsertTimerInfos []*p.TimerInfo, deleteTimerInfos []string, upsertChildInfos []*p.ChildExecutionInfo, deleteChildInfo *int64, upsertCancelInfos []*p.RequestCancelInfo, deleteCancelInfo *int64, upsertSignalInfos []*p.SignalInfo, deleteSignalInfo *int64, upsertSignalRequestedIDs []string, deleteSignalRequestedID string) error
UpdateWorkflowExecutionWithRangeID is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionWithReplication ¶
func (s *TestBase) UpdateWorkflowExecutionWithReplication(updatedInfo *p.WorkflowExecutionInfo, updatedReplicationState *p.ReplicationState, decisionScheduleIDs []int64, activityScheduleIDs []int64, rangeID, condition int64, timerTasks []p.Task, txTasks []p.Task, deleteTimerTask p.Task, upsertActivityInfos []*p.ActivityInfo, deleteActivityInfos []int64, upsertTimerInfos []*p.TimerInfo, deleteTimerInfos []string, upsertChildInfos []*p.ChildExecutionInfo, deleteChildInfo *int64, upsertCancelInfos []*p.RequestCancelInfo, deleteCancelInfo *int64, upsertSignalInfos []*p.SignalInfo, deleteSignalInfo *int64, upsertSignalRequestedIDs []string, deleteSignalRequestedID string, newBufferedReplicationTask *p.BufferedReplicationTask, deleteBufferedReplicationTask *int64) error
UpdateWorkflowExecutionWithReplication is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionWithTransferTasks ¶
func (s *TestBase) UpdateWorkflowExecutionWithTransferTasks( updatedInfo *p.WorkflowExecutionInfo, condition int64, transferTasks []p.Task, upsertActivityInfo []*p.ActivityInfo) error
UpdateWorkflowExecutionWithTransferTasks is a utility method to update workflow execution
func (*TestBase) UpdateWorklowStateAndReplication ¶
func (s *TestBase) UpdateWorklowStateAndReplication(updatedInfo *p.WorkflowExecutionInfo, updatedReplicationState *p.ReplicationState, newBufferedReplicationTask *p.BufferedReplicationTask, deleteBufferedReplicationTask *int64, condition int64, txTasks []p.Task) error
UpdateWorklowStateAndReplication is a utility method to update workflow execution
func (*TestBase) UpsertChildExecutionsState ¶
func (s *TestBase) UpsertChildExecutionsState(updatedInfo *p.WorkflowExecutionInfo, condition int64, upsertChildInfos []*p.ChildExecutionInfo) error
UpsertChildExecutionsState is a utility method to update mutable state of workflow execution
func (*TestBase) UpsertRequestCancelState ¶
func (s *TestBase) UpsertRequestCancelState(updatedInfo *p.WorkflowExecutionInfo, condition int64, upsertCancelInfos []*p.RequestCancelInfo) error
UpsertRequestCancelState is a utility method to update mutable state of workflow execution
func (*TestBase) UpsertSignalInfoState ¶
func (s *TestBase) UpsertSignalInfoState(updatedInfo *p.WorkflowExecutionInfo, condition int64, upsertSignalInfos []*p.SignalInfo) error
UpsertSignalInfoState is a utility method to update mutable state of workflow execution
func (*TestBase) UpsertSignalsRequestedState ¶
func (s *TestBase) UpsertSignalsRequestedState(updatedInfo *p.WorkflowExecutionInfo, condition int64, upsertSignalsRequested []string) error
UpsertSignalsRequestedState is a utility method to update mutable state of workflow execution
type TestBaseOptions ¶
type TestBaseOptions struct { DBName string Cassandra struct { DBPort int SchemaDir string } SQL struct { DBPort int SchemaDir string DriverName string } // TODO this is used for global domain test // when cross DC is public, remove EnableGlobalDomain EnableGlobalDomain bool // is global domain enabled IsMasterCluster bool // is master cluster ClusterMetadata cluster.Metadata }
TestBaseOptions options to configure workflow test base.
type TestTransferTaskIDGenerator ¶
type TestTransferTaskIDGenerator struct {
// contains filtered or unexported fields
}
TestTransferTaskIDGenerator helper
func (*TestTransferTaskIDGenerator) GetNextTransferTaskID ¶
func (g *TestTransferTaskIDGenerator) GetNextTransferTaskID() (int64, error)
GetNextTransferTaskID helper
type TransferTaskIDGenerator ¶
TransferTaskIDGenerator generates IDs for transfer tasks written by helper methods
type VisibilityPersistenceSuite ¶
type VisibilityPersistenceSuite struct { TestBase // override suite.Suite.Assertions with require.Assertions; this means that s.NotNil(nil) will stop the test, // not merely log an error *require.Assertions }
VisibilityPersistenceSuite tests visibility persistence
func (*VisibilityPersistenceSuite) SetupSuite ¶
func (s *VisibilityPersistenceSuite) SetupSuite()
SetupSuite implementation
func (*VisibilityPersistenceSuite) SetupTest ¶
func (s *VisibilityPersistenceSuite) SetupTest()
SetupTest implementation
func (*VisibilityPersistenceSuite) TearDownSuite ¶
func (s *VisibilityPersistenceSuite) TearDownSuite()
TearDownSuite implementation
func (*VisibilityPersistenceSuite) TestBasicVisibility ¶
func (s *VisibilityPersistenceSuite) TestBasicVisibility()
TestBasicVisibility test
func (*VisibilityPersistenceSuite) TestFilteringByCloseStatus ¶
func (s *VisibilityPersistenceSuite) TestFilteringByCloseStatus()
TestFilteringByCloseStatus test
func (*VisibilityPersistenceSuite) TestFilteringByType ¶
func (s *VisibilityPersistenceSuite) TestFilteringByType()
TestFilteringByType test
func (*VisibilityPersistenceSuite) TestFilteringByWorkflowID ¶
func (s *VisibilityPersistenceSuite) TestFilteringByWorkflowID()
TestFilteringByWorkflowID test
func (*VisibilityPersistenceSuite) TestGetClosedExecution ¶
func (s *VisibilityPersistenceSuite) TestGetClosedExecution()
TestGetClosedExecution test
func (*VisibilityPersistenceSuite) TestVisibilityPagination ¶
func (s *VisibilityPersistenceSuite) TestVisibilityPagination()
TestVisibilityPagination test