Documentation ¶
Index ¶
- Constants
- func GenerateRandomDBName(n int) string
- type ClusterMetadataManagerSuite
- func (s *ClusterMetadataManagerSuite) SetupSuite()
- func (s *ClusterMetadataManagerSuite) SetupTest()
- func (s *ClusterMetadataManagerSuite) TearDownSuite()
- func (s *ClusterMetadataManagerSuite) TestClusterMembershipEmptyInitially()
- func (s *ClusterMetadataManagerSuite) TestClusterMembershipReadFiltersCorrectly()
- func (s *ClusterMetadataManagerSuite) TestClusterMembershipUpsertCanPageRead()
- func (s *ClusterMetadataManagerSuite) TestClusterMembershipUpsertCanReadAny()
- func (s *ClusterMetadataManagerSuite) TestClusterMembershipUpsertExpiresCorrectly()
- func (s *ClusterMetadataManagerSuite) TestClusterMembershipUpsertInvalidExpiry()
- func (s *ClusterMetadataManagerSuite) TestInitImmutableMetadataReadWrite()
- type ExecutionManagerSuite
- func (s *ExecutionManagerSuite) SetupSuite()
- func (s *ExecutionManagerSuite) SetupTest()
- func (s *ExecutionManagerSuite) TearDownSuite()
- func (s *ExecutionManagerSuite) TestCancelTransferTaskTasks()
- func (s *ExecutionManagerSuite) TestCleanupCorruptedWorkflow()
- func (s *ExecutionManagerSuite) TestContinueAsNew()
- func (s *ExecutionManagerSuite) TestCreateGetShardBackfill()
- func (s *ExecutionManagerSuite) TestCreateGetUpdateGetShard()
- func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionBrandNew()
- func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionConcurrentCreate()
- func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionDeDup()
- func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionRunIDReuseWithoutReplication()
- func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionStateStatus()
- func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionWithZombieState()
- func (s *ExecutionManagerSuite) TestDeleteCurrentWorkflow()
- func (s *ExecutionManagerSuite) TestDeleteWorkflow()
- func (s *ExecutionManagerSuite) TestGetCurrentWorkflow()
- func (s *ExecutionManagerSuite) TestGetWorkflow()
- func (s *ExecutionManagerSuite) TestPersistenceStartWorkflow()
- func (s *ExecutionManagerSuite) TestReplicationDLQ()
- func (s *ExecutionManagerSuite) TestReplicationTasks()
- func (s *ExecutionManagerSuite) TestReplicationTransferTaskRangeComplete()
- func (s *ExecutionManagerSuite) TestReplicationTransferTaskTasks()
- 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) TestUpdateDeleteWorkflow()
- func (s *ExecutionManagerSuite) TestUpdateWorkflow()
- func (s *ExecutionManagerSuite) TestUpdateWorkflowExecutionStateStatus()
- func (s *ExecutionManagerSuite) TestUpdateWorkflowExecutionWithZombieState()
- func (s *ExecutionManagerSuite) TestUpsertWorkflowActivity()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateActivities()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateChildExecutions()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateInfo()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateRequestCancel()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateSignalInfo()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateSignalRequested()
- func (s *ExecutionManagerSuite) TestWorkflowMutableStateTimers()
- 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) TestWorkflowCreationWithVersionHistories()
- 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()
- func (s *HistoryV2PersistenceSuite) TestReadBranchByPagination()
- func (s *HistoryV2PersistenceSuite) TestScanAllTrees()
- type MetadataPersistenceSuiteV2
- func (m *MetadataPersistenceSuiteV2) CreateNamespace(info *persistencespb.NamespaceInfo, config *persistencespb.NamespaceConfig, ...) (*p.CreateNamespaceResponse, error)
- func (m *MetadataPersistenceSuiteV2) DeleteNamespace(id string, name string) error
- func (m *MetadataPersistenceSuiteV2) GetNamespace(id string, name string) (*p.GetNamespaceResponse, error)
- func (m *MetadataPersistenceSuiteV2) ListNamespaces(pageSize int, pageToken []byte) (*p.ListNamespacesResponse, error)
- func (m *MetadataPersistenceSuiteV2) SetupSuite()
- func (m *MetadataPersistenceSuiteV2) SetupTest()
- func (m *MetadataPersistenceSuiteV2) TearDownSuite()
- func (m *MetadataPersistenceSuiteV2) TearDownTest()
- func (m *MetadataPersistenceSuiteV2) TestConcurrentCreateNamespace()
- func (m *MetadataPersistenceSuiteV2) TestConcurrentUpdateNamespace()
- func (m *MetadataPersistenceSuiteV2) TestCreateNamespace()
- func (m *MetadataPersistenceSuiteV2) TestDeleteNamespace()
- func (m *MetadataPersistenceSuiteV2) TestGetNamespace()
- func (m *MetadataPersistenceSuiteV2) TestListNamespaces()
- func (m *MetadataPersistenceSuiteV2) TestUpdateNamespace()
- func (m *MetadataPersistenceSuiteV2) UpdateNamespace(info *persistencespb.NamespaceInfo, config *persistencespb.NamespaceConfig, ...) error
- type PersistenceTestCluster
- type QueuePersistenceSuite
- func (s *QueuePersistenceSuite) SetupSuite()
- func (s *QueuePersistenceSuite) SetupTest()
- func (s *QueuePersistenceSuite) TearDownSuite()
- func (s *QueuePersistenceSuite) TestNamespaceDLQMetadataOperations()
- func (s *QueuePersistenceSuite) TestNamespaceReplicationDLQ()
- func (s *QueuePersistenceSuite) TestNamespaceReplicationQueue()
- func (s *QueuePersistenceSuite) TestQueueMetadataOperations()
- 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(namespaceID string, taskQueue string, taskType enumspb.TaskQueueType, ...) error
- func (s *TestBase) CompleteTimerTask(ts time.Time, taskID int64) error
- func (s *TestBase) CompleteTimerTaskProto(ts *types.Timestamp, taskID int64) error
- func (s *TestBase) CompleteTransferTask(taskID int64) error
- func (s *TestBase) ContinueAsNewExecution(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) CreateChildWorkflowExecution(namespaceID string, workflowExecution commonpb.WorkflowExecution, ...) (*persistence.CreateWorkflowExecutionResponse, error)
- func (s *TestBase) CreateWorkflowExecution(namespaceID string, workflowExecution commonpb.WorkflowExecution, ...) (*persistence.CreateWorkflowExecutionResponse, error)
- func (s *TestBase) CreateWorkflowExecutionManyTasks(namespaceID string, workflowExecution commonpb.WorkflowExecution, ...) (*persistence.CreateWorkflowExecutionResponse, error)
- func (s *TestBase) CreateWorkflowExecutionWithBranchToken(namespaceID string, workflowExecution commonpb.WorkflowExecution, ...) (*persistence.CreateWorkflowExecutionResponse, error)
- func (s *TestBase) DeleteCancelState(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) DeleteChildExecutionsState(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) DeleteCurrentWorkflowExecution(info *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) DeleteMessageFromNamespaceDLQ(messageID int64) error
- func (s *TestBase) DeleteReplicationTaskFromDLQ(sourceCluster string, taskID int64) error
- func (s *TestBase) DeleteSignalState(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) DeleteSignalsRequestedState(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) DeleteWorkflowExecution(info *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) EqualTimes(t1, t2 time.Time)
- func (s *TestBase) EqualTimesWithPrecision(t1, t2 time.Time, precision time.Duration)
- func (s *TestBase) GetAckLevels() (map[string]int64, error)
- func (s *TestBase) GetCurrentWorkflowRunID(namespaceID, workflowID string) (string, error)
- func (s *TestBase) GetMessagesFromNamespaceDLQ(firstMessageID int64, lastMessageID int64, pageSize int, pageToken []byte) ([]*replicationspb.ReplicationTask, []byte, error)
- func (s *TestBase) GetNamespaceDLQAckLevel() (int64, error)
- func (s *TestBase) GetNextSequenceNumber() int64
- func (s *TestBase) GetOrCreateShard(shardID int32, owner string, rangeID int64) (*persistencespb.ShardInfo, error)
- func (s *TestBase) GetReplicationMessages(lastMessageID int64, pageSize int) ([]*replicationspb.ReplicationTask, int64, error)
- func (s *TestBase) GetReplicationReadLevel() int64
- func (s *TestBase) GetReplicationTasks(batchSize int, getAll bool) ([]tasks.Task, error)
- func (s *TestBase) GetReplicationTasksFromDLQ(sourceCluster string, readLevel int64, maxReadLevel int64, pageSize int, ...) (*persistence.GetReplicationTasksFromDLQResponse, error)
- func (s *TestBase) GetTasks(namespaceID string, taskQueue string, taskType enumspb.TaskQueueType, ...) (*persistence.GetTasksResponse, error)
- func (s *TestBase) GetTimerTasks(batchSize int, getAll bool) ([]tasks.Task, error)
- func (s *TestBase) GetTransferReadLevel() int64
- func (s *TestBase) GetTransferTasks(batchSize int, getAll bool) ([]tasks.Task, error)
- func (s *TestBase) GetWorkflowMutableState(namespaceID string, workflowExecution commonpb.WorkflowExecution) (*persistencespb.WorkflowMutableState, error)
- func (s *TestBase) Publish(message interface{}) error
- func (s *TestBase) PublishToNamespaceDLQ(message interface{}) error
- func (s *TestBase) PutReplicationTaskToDLQ(sourceCluster string, taskInfo *persistencespb.ReplicationTaskInfo) error
- func (s *TestBase) RangeCompleteReplicationTask(inclusiveEndTaskID int64) error
- func (s *TestBase) RangeCompleteTimerTask(inclusiveBeginTimestamp time.Time, exclusiveEndTimestamp time.Time) error
- func (s *TestBase) RangeCompleteTransferTask(exclusiveBeginTaskID int64, inclusiveEndTaskID int64) error
- func (s *TestBase) RangeDeleteMessagesFromNamespaceDLQ(firstMessageID int64, lastMessageID int64) error
- func (s *TestBase) RangeDeleteReplicationTaskFromDLQ(sourceCluster string, beginTaskID int64, endTaskID int64) error
- func (s *TestBase) Setup(clusterMetadataConfig *cluster.Config)
- func (s *TestBase) TearDownWorkflowStore()
- func (s *TestBase) UpdateAckLevel(lastProcessedMessageID int64, clusterName string) error
- func (s *TestBase) UpdateAllMutableState(updatedMutableState *persistencespb.WorkflowMutableState, condition int64) error
- func (s *TestBase) UpdateNamespaceDLQAckLevel(lastProcessedMessageID int64) error
- func (s *TestBase) UpdateShard(updatedInfo *persistencespb.ShardInfo, previousRangeID int64) error
- func (s *TestBase) UpdateWorkflowExecution(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) UpdateWorkflowExecutionAndFinish(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) UpdateWorkflowExecutionForBufferEvents(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) UpdateWorkflowExecutionForChildExecutionsInitiated(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedNextEventID int64, ...) error
- func (s *TestBase) UpdateWorkflowExecutionForRequestCancel(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedNextEventID int64, ...) error
- func (s *TestBase) UpdateWorkflowExecutionForSignal(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedNextEventID int64, ...) error
- func (s *TestBase) UpdateWorkflowExecutionWithRangeID(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) UpdateWorkflowExecutionWithReplication(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) UpdateWorkflowExecutionWithTransferTasks(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) UpdateWorklowStateAndReplication(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) UpsertChildExecutionsState(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) UpsertRequestCancelState(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) UpsertSignalInfoState(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- func (s *TestBase) UpsertSignalsRequestedState(updatedInfo *persistencespb.WorkflowExecutionInfo, ...) error
- type TestBaseOptions
- type TestTransferTaskIDGenerator
- type TransferTaskIDGenerator
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 ¶
func GenerateRandomDBName ¶
GenerateRandomDBName helper Format: MMDDHHMMSS_abc
Types ¶
type ClusterMetadataManagerSuite ¶ added in v0.27.0
type ClusterMetadataManagerSuite 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 }
ClusterMetadataManagerSuite runs tests that cover the ClusterMetadata read/write scenarios
func (*ClusterMetadataManagerSuite) SetupSuite ¶ added in v0.27.0
func (s *ClusterMetadataManagerSuite) SetupSuite()
SetupSuite implementation
func (*ClusterMetadataManagerSuite) SetupTest ¶ added in v0.27.0
func (s *ClusterMetadataManagerSuite) SetupTest()
SetupTest implementation
func (*ClusterMetadataManagerSuite) TearDownSuite ¶ added in v0.27.0
func (s *ClusterMetadataManagerSuite) TearDownSuite()
TearDownSuite implementation
func (*ClusterMetadataManagerSuite) TestClusterMembershipEmptyInitially ¶ added in v0.27.0
func (s *ClusterMetadataManagerSuite) TestClusterMembershipEmptyInitially()
TestClusterMembershipEmptyInitially verifies the GetClusterMembers() works with an initial empty table
func (*ClusterMetadataManagerSuite) TestClusterMembershipReadFiltersCorrectly ¶ added in v0.27.0
func (s *ClusterMetadataManagerSuite) TestClusterMembershipReadFiltersCorrectly()
TestClusterMembershipReadFiltersCorrectly verifies that we can UpsertClusterMembership and read our result using filters
func (*ClusterMetadataManagerSuite) TestClusterMembershipUpsertCanPageRead ¶ added in v0.27.0
func (s *ClusterMetadataManagerSuite) TestClusterMembershipUpsertCanPageRead()
TestClusterMembershipUpsertCanRead verifies that we can UpsertClusterMembership and read our result
func (*ClusterMetadataManagerSuite) TestClusterMembershipUpsertCanReadAny ¶ added in v0.27.0
func (s *ClusterMetadataManagerSuite) TestClusterMembershipUpsertCanReadAny()
TestClusterMembershipUpsertCanRead verifies that we can UpsertClusterMembership and read our result
func (*ClusterMetadataManagerSuite) TestClusterMembershipUpsertExpiresCorrectly ¶ added in v0.27.0
func (s *ClusterMetadataManagerSuite) TestClusterMembershipUpsertExpiresCorrectly()
TestClusterMembershipUpsertExpiresCorrectly verifies RecordExpiry functions properly for ClusterMembership records
func (*ClusterMetadataManagerSuite) TestClusterMembershipUpsertInvalidExpiry ¶ added in v0.27.0
func (s *ClusterMetadataManagerSuite) TestClusterMembershipUpsertInvalidExpiry()
TestClusterMembershipUpsertInvalidExpiry verifies we cannot specify a non-positive RecordExpiry duration
func (*ClusterMetadataManagerSuite) TestInitImmutableMetadataReadWrite ¶ added in v0.27.0
func (s *ClusterMetadataManagerSuite) TestInitImmutableMetadataReadWrite()
TestInitImmutableMetadataReadWrite runs through the various cases of ClusterMetadata behavior Cases: 1 - Get, no data persisted 2 - Init, no data persisted 3 - Get, data persisted 4 - Init, data persisted 5 - Update, add version info and make sure it's persisted and can be retrieved. 6 - Delete, no data persisted
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) TestCleanupCorruptedWorkflow ¶ added in v0.27.0
func (s *ExecutionManagerSuite) TestCleanupCorruptedWorkflow()
TestCleanupCorruptedWorkflow 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) TestCreateWorkflowExecutionDeDup ¶ added in v0.27.0
func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionDeDup()
TestCreateWorkflowExecutionDeDup test
func (*ExecutionManagerSuite) TestCreateWorkflowExecutionRunIDReuseWithoutReplication ¶
func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionRunIDReuseWithoutReplication()
TestCreateWorkflowExecutionRunIDReuseWithoutReplication test
func (*ExecutionManagerSuite) TestCreateWorkflowExecutionStateStatus ¶ added in v0.27.0
func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionStateStatus()
TestCreateWorkflowExecutionStateStatus test
func (*ExecutionManagerSuite) TestCreateWorkflowExecutionWithZombieState ¶ added in v0.27.0
func (s *ExecutionManagerSuite) TestCreateWorkflowExecutionWithZombieState()
TestCreateWorkflowExecutionWithZombieState 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) TestReplicationDLQ ¶ added in v0.27.0
func (s *ExecutionManagerSuite) TestReplicationDLQ()
TestReplicationDLQ test
func (*ExecutionManagerSuite) TestReplicationTasks ¶
func (s *ExecutionManagerSuite) TestReplicationTasks()
TestReplicationTasks test
func (*ExecutionManagerSuite) TestReplicationTransferTaskRangeComplete ¶ added in v0.27.0
func (s *ExecutionManagerSuite) TestReplicationTransferTaskRangeComplete()
TestReplicationTransferTaskRangeComplete test
func (*ExecutionManagerSuite) TestReplicationTransferTaskTasks ¶
func (s *ExecutionManagerSuite) TestReplicationTransferTaskTasks()
TestReplicationTransferTaskTasks 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) TestUpdateDeleteWorkflow ¶ added in v0.5.3
func (s *ExecutionManagerSuite) TestUpdateDeleteWorkflow()
TestUpdateDeleteWorkflow mocks the timer behavoir to clean up workflow.
func (*ExecutionManagerSuite) TestUpdateWorkflow ¶
func (s *ExecutionManagerSuite) TestUpdateWorkflow()
TestUpdateWorkflow test
func (*ExecutionManagerSuite) TestUpdateWorkflowExecutionStateStatus ¶ added in v0.27.0
func (s *ExecutionManagerSuite) TestUpdateWorkflowExecutionStateStatus()
TestUpdateWorkflowExecutionStateStatus test
func (*ExecutionManagerSuite) TestUpdateWorkflowExecutionWithZombieState ¶ added in v0.27.0
func (s *ExecutionManagerSuite) TestUpdateWorkflowExecutionWithZombieState()
TestUpdateWorkflowExecutionWithZombieState test
func (*ExecutionManagerSuite) TestUpsertWorkflowActivity ¶ added in v1.0.0
func (s *ExecutionManagerSuite) TestUpsertWorkflowActivity()
TestUpsertWorkflowActivity test
func (*ExecutionManagerSuite) TestWorkflowMutableStateActivities ¶
func (s *ExecutionManagerSuite) TestWorkflowMutableStateActivities()
TestWorkflowMutableStateActivities 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
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) TestWorkflowCreationWithVersionHistories ¶ added in v0.27.0
func (s *ExecutionManagerSuiteForEventsV2) TestWorkflowCreationWithVersionHistories()
TestWorkflowCreationWithVersionHistories 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
func (*HistoryV2PersistenceSuite) TestReadBranchByPagination ¶ added in v0.5.7
func (s *HistoryV2PersistenceSuite) TestReadBranchByPagination()
TestReadBranchByPagination test
func (*HistoryV2PersistenceSuite) TestScanAllTrees ¶ added in v0.27.0
func (s *HistoryV2PersistenceSuite) TestScanAllTrees()
TestScanAllTrees test
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) CreateNamespace ¶ added in v0.27.0
func (m *MetadataPersistenceSuiteV2) CreateNamespace(info *persistencespb.NamespaceInfo, config *persistencespb.NamespaceConfig, replicationConfig *persistencespb.NamespaceReplicationConfig, isGlobalnamespace bool, configVersion int64, failoverVersion int64) (*p.CreateNamespaceResponse, error)
CreateNamespace helper method
func (*MetadataPersistenceSuiteV2) DeleteNamespace ¶ added in v0.27.0
func (m *MetadataPersistenceSuiteV2) DeleteNamespace(id string, name string) error
DeleteNamespace helper method
func (*MetadataPersistenceSuiteV2) GetNamespace ¶ added in v0.27.0
func (m *MetadataPersistenceSuiteV2) GetNamespace(id string, name string) (*p.GetNamespaceResponse, error)
GetNamespace helper method
func (*MetadataPersistenceSuiteV2) ListNamespaces ¶ added in v0.27.0
func (m *MetadataPersistenceSuiteV2) ListNamespaces(pageSize int, pageToken []byte) (*p.ListNamespacesResponse, error)
ListNamespaces 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) TestConcurrentCreateNamespace ¶ added in v0.27.0
func (m *MetadataPersistenceSuiteV2) TestConcurrentCreateNamespace()
TestConcurrentCreateNamespace test
func (*MetadataPersistenceSuiteV2) TestConcurrentUpdateNamespace ¶ added in v0.27.0
func (m *MetadataPersistenceSuiteV2) TestConcurrentUpdateNamespace()
TestConcurrentUpdateNamespace test
func (*MetadataPersistenceSuiteV2) TestCreateNamespace ¶ added in v0.27.0
func (m *MetadataPersistenceSuiteV2) TestCreateNamespace()
TestCreateNamespace test
func (*MetadataPersistenceSuiteV2) TestDeleteNamespace ¶ added in v0.27.0
func (m *MetadataPersistenceSuiteV2) TestDeleteNamespace()
TestDeleteNamespace test
func (*MetadataPersistenceSuiteV2) TestGetNamespace ¶ added in v0.27.0
func (m *MetadataPersistenceSuiteV2) TestGetNamespace()
TestGetNamespace test
func (*MetadataPersistenceSuiteV2) TestListNamespaces ¶ added in v0.27.0
func (m *MetadataPersistenceSuiteV2) TestListNamespaces()
TestListNamespaces test
func (*MetadataPersistenceSuiteV2) TestUpdateNamespace ¶ added in v0.27.0
func (m *MetadataPersistenceSuiteV2) TestUpdateNamespace()
TestUpdateNamespace test
func (*MetadataPersistenceSuiteV2) UpdateNamespace ¶ added in v0.27.0
func (m *MetadataPersistenceSuiteV2) UpdateNamespace( info *persistencespb.NamespaceInfo, config *persistencespb.NamespaceConfig, replicationConfig *persistencespb.NamespaceReplicationConfig, configVersion int64, failoverVersion int64, failoverNotificationVersion int64, failoverEndTime *time.Time, notificationVersion int64, isGlobalNamespace bool, ) error
UpdateNamespace helper method
type PersistenceTestCluster ¶
type PersistenceTestCluster interface { SetupTestDatabase() TearDownTestDatabase() Config() config.Persistence }
PersistenceTestCluster exposes management operations on a database
type QueuePersistenceSuite ¶ added in v0.27.0
type QueuePersistenceSuite 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 }
QueuePersistenceSuite contains queue persistence tests
func (*QueuePersistenceSuite) SetupSuite ¶ added in v0.27.0
func (s *QueuePersistenceSuite) SetupSuite()
SetupSuite implementation
func (*QueuePersistenceSuite) SetupTest ¶ added in v0.27.0
func (s *QueuePersistenceSuite) SetupTest()
SetupTest implementation
func (*QueuePersistenceSuite) TearDownSuite ¶ added in v0.27.0
func (s *QueuePersistenceSuite) TearDownSuite()
TearDownSuite implementation
func (*QueuePersistenceSuite) TestNamespaceDLQMetadataOperations ¶ added in v0.27.0
func (s *QueuePersistenceSuite) TestNamespaceDLQMetadataOperations()
TestNamespaceDLQMetadataOperations tests queue metadata operations
func (*QueuePersistenceSuite) TestNamespaceReplicationDLQ ¶ added in v0.27.0
func (s *QueuePersistenceSuite) TestNamespaceReplicationDLQ()
TestNamespaceReplicationDLQ tests namespace DLQ operations
func (*QueuePersistenceSuite) TestNamespaceReplicationQueue ¶ added in v0.27.0
func (s *QueuePersistenceSuite) TestNamespaceReplicationQueue()
TestNamespaceReplicationQueue tests namespace replication queue operations
func (*QueuePersistenceSuite) TestQueueMetadataOperations ¶ added in v0.27.0
func (s *QueuePersistenceSuite) TestQueueMetadataOperations()
TestQueueMetadataOperations tests queue metadata operations
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) TestGetOrCreateShard ¶ added in v1.14.0
func (s *ShardPersistenceSuite) TestGetOrCreateShard()
TestGetOrCreateShard tests GetOrCreateShard
func (*ShardPersistenceSuite) TestUpdateShard ¶
func (s *ShardPersistenceSuite) TestUpdateShard()
TestUpdateShard test
type TestBase ¶
type TestBase struct { suite.Suite ShardMgr persistence.ShardManager AbstractDataStoreFactory client.AbstractDataStoreFactory FaultInjection *client.FaultInjectionDataStoreFactory Factory client.Factory ExecutionManager persistence.ExecutionManager TaskMgr persistence.TaskManager ClusterMetadataManager persistence.ClusterMetadataManager MetadataManager persistence.MetadataManager NamespaceReplicationQueue persistence.NamespaceReplicationQueue ShardInfo *persistencespb.ShardInfo TaskIDGenerator TransferTaskIDGenerator ClusterMetadata cluster.Metadata SearchAttributesManager searchattribute.Manager ReadLevel int64 ReplicationReadLevel int64 DefaultTestCluster PersistenceTestCluster Logger log.Logger }
TestBase wraps the base setup needed to create workflows over persistence layer.
func NewTestBase ¶ added in v0.5.7
func NewTestBase(options *TestBaseOptions) TestBase
NewTestBase returns a persistence test base backed by either cassandra or sql
func NewTestBaseForCluster ¶ added in v1.12.0
func NewTestBaseForCluster(testCluster PersistenceTestCluster, logger log.Logger) TestBase
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(namespaceID string, taskQueue string, taskType enumspb.TaskQueueType, taskID 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) CompleteTimerTaskProto ¶ added in v0.27.0
func (*TestBase) CompleteTransferTask ¶
CompleteTransferTask is a utility method to complete a transfer task
func (*TestBase) ContinueAsNewExecution ¶
func (s *TestBase) ContinueAsNewExecution(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, updatedNextEventID int64, condition int64, newExecution commonpb.WorkflowExecution, nextEventID, workflowTaskScheduleID int64, prevResetPoints *workflowpb.ResetPoints) error
ContinueAsNewExecution is a utility method to create workflow executions
func (*TestBase) CreateChildWorkflowExecution ¶
func (s *TestBase) CreateChildWorkflowExecution(namespaceID string, workflowExecution commonpb.WorkflowExecution, parentNamespaceID string, parentExecution commonpb.WorkflowExecution, initiatedID int64, taskQueue, wType string, wTimeout *time.Duration, workflowTaskTimeout *time.Duration, nextEventID int64, lastProcessedEventID int64, workflowTaskScheduleID int64, timerTasks []tasks.Task) (*persistence.CreateWorkflowExecutionResponse, error)
CreateChildWorkflowExecution is a utility method to create child workflow executions
func (*TestBase) CreateWorkflowExecution ¶
func (s *TestBase) CreateWorkflowExecution(namespaceID string, workflowExecution commonpb.WorkflowExecution, taskQueue, wType string, wTimeout *time.Duration, workflowTaskTimeout *time.Duration, nextEventID, lastProcessedEventID, workflowTaskScheduleID int64, timerTasks []tasks.Task) (*persistence.CreateWorkflowExecutionResponse, error)
CreateWorkflowExecution is a utility method to create workflow executions
func (*TestBase) CreateWorkflowExecutionManyTasks ¶
func (s *TestBase) CreateWorkflowExecutionManyTasks(namespaceID string, workflowExecution commonpb.WorkflowExecution, taskQueue string, nextEventID int64, lastProcessedEventID int64, workflowTaskScheduleIDs []int64, activityScheduleIDs []int64) (*persistence.CreateWorkflowExecutionResponse, error)
CreateWorkflowExecutionManyTasks is a utility method to create workflow executions
func (*TestBase) CreateWorkflowExecutionWithBranchToken ¶ added in v0.27.0
func (s *TestBase) CreateWorkflowExecutionWithBranchToken(namespaceID string, workflowExecution commonpb.WorkflowExecution, taskQueue, wType string, wTimeout *time.Duration, workflowTaskTimeout *time.Duration, nextEventID int64, lastProcessedEventID int64, workflowTaskScheduleID int64, branchToken []byte, timerTasks []tasks.Task) (*persistence.CreateWorkflowExecutionResponse, error)
CreateWorkflowExecutionWithBranchToken test util function
func (*TestBase) DeleteCancelState ¶
func (s *TestBase) DeleteCancelState(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, nextEventID int64, 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 *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, nextEventID int64, condition int64, deleteChildInfo int64) error
DeleteChildExecutionsState is a utility method to delete child execution from mutable state
func (*TestBase) DeleteCurrentWorkflowExecution ¶ added in v0.5.8
func (s *TestBase) DeleteCurrentWorkflowExecution(info *persistencespb.WorkflowExecutionInfo, state *persistencespb.WorkflowExecutionState) error
DeleteCurrentWorkflowExecution is a utility method to delete the workflow current execution
func (*TestBase) DeleteMessageFromNamespaceDLQ ¶ added in v0.27.0
DeleteMessageFromNamespaceDLQ deletes one message from namespace DLQ
func (*TestBase) DeleteReplicationTaskFromDLQ ¶ added in v0.27.0
DeleteReplicationTaskFromDLQ is a utility method to delete a replication task info
func (*TestBase) DeleteSignalState ¶
func (s *TestBase) DeleteSignalState(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, nextEventID int64, 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 *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, nextEventID int64, condition int64, deleteSignalsRequestedIDs []string) error
DeleteSignalsRequestedState is a utility method to delete mutable state of workflow execution
func (*TestBase) DeleteWorkflowExecution ¶
func (s *TestBase) DeleteWorkflowExecution(info *persistencespb.WorkflowExecutionInfo, state *persistencespb.WorkflowExecutionState) 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) GetAckLevels ¶ added in v0.27.0
GetAckLevels returns replication queue ack levels
func (*TestBase) GetCurrentWorkflowRunID ¶
GetCurrentWorkflowRunID returns the workflow run ID for the given params
func (*TestBase) GetMessagesFromNamespaceDLQ ¶ added in v0.27.0
func (s *TestBase) GetMessagesFromNamespaceDLQ( firstMessageID int64, lastMessageID int64, pageSize int, pageToken []byte, ) ([]*replicationspb.ReplicationTask, []byte, error)
GetMessagesFromNamespaceDLQ is a utility method to get messages from the namespace DLQ
func (*TestBase) GetNamespaceDLQAckLevel ¶ added in v0.27.0
GetNamespaceDLQAckLevel returns namespace dlq ack level
func (*TestBase) GetNextSequenceNumber ¶
GetNextSequenceNumber generates a unique sequence number for can be used for transfer queue taskId
func (*TestBase) GetOrCreateShard ¶ added in v1.14.0
func (s *TestBase) GetOrCreateShard(shardID int32, owner string, rangeID int64) (*persistencespb.ShardInfo, error)
GetOrCreateShard is a utility method to get/create the shard using persistence layer
func (*TestBase) GetReplicationMessages ¶ added in v0.27.0
func (s *TestBase) GetReplicationMessages( lastMessageID int64, pageSize int, ) ([]*replicationspb.ReplicationTask, int64, error)
GetReplicationMessages is a utility method to get messages from the queue
func (*TestBase) GetReplicationReadLevel ¶
GetReplicationReadLevel returns the current read level for shard
func (*TestBase) GetReplicationTasks ¶
GetReplicationTasks is a utility method to get tasks from replication task queue
func (*TestBase) GetReplicationTasksFromDLQ ¶ added in v0.27.0
func (s *TestBase) GetReplicationTasksFromDLQ( sourceCluster string, readLevel int64, maxReadLevel int64, pageSize int, pageToken []byte, ) (*persistence.GetReplicationTasksFromDLQResponse, error)
GetReplicationTasksFromDLQ is a utility method to read replication task info
func (*TestBase) GetTasks ¶
func (s *TestBase) GetTasks(namespaceID string, taskQueue string, taskType enumspb.TaskQueueType, batchSize int) (*persistence.GetTasksResponse, error)
GetTasks is a utility method to get tasks from persistence
func (*TestBase) GetTimerTasks ¶ added in v1.14.0
GetTimerTasks 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) GetWorkflowMutableState ¶ added in v1.3.0
func (s *TestBase) GetWorkflowMutableState(namespaceID string, workflowExecution commonpb.WorkflowExecution) ( *persistencespb.WorkflowMutableState, error)
GetWorkflowExecutionInfo is a utility method to retrieve execution info
func (*TestBase) Publish ¶ added in v0.27.0
Publish is a utility method to add messages to the queue
func (*TestBase) PublishToNamespaceDLQ ¶ added in v0.27.0
PublishToNamespaceDLQ is a utility method to add messages to the namespace DLQ
func (*TestBase) PutReplicationTaskToDLQ ¶ added in v0.27.0
func (s *TestBase) PutReplicationTaskToDLQ( sourceCluster string, taskInfo *persistencespb.ReplicationTaskInfo, ) error
PutReplicationTaskToDLQ is a utility method to insert a replication task info
func (*TestBase) RangeCompleteReplicationTask ¶ added in v0.27.0
RangeCompleteReplicationTask is a utility method to complete a range of replication tasks
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) RangeDeleteMessagesFromNamespaceDLQ ¶ added in v0.27.0
func (s *TestBase) RangeDeleteMessagesFromNamespaceDLQ( firstMessageID int64, lastMessageID int64, ) error
RangeDeleteMessagesFromNamespaceDLQ deletes messages from namespace DLQ
func (*TestBase) RangeDeleteReplicationTaskFromDLQ ¶ added in v0.27.0
func (s *TestBase) RangeDeleteReplicationTaskFromDLQ( sourceCluster string, beginTaskID int64, endTaskID int64, ) error
RangeDeleteReplicationTaskFromDLQ is a utility method to delete replication task info
func (*TestBase) TearDownWorkflowStore ¶
func (s *TestBase) TearDownWorkflowStore()
TearDownWorkflowStore to cleanup
func (*TestBase) UpdateAckLevel ¶ added in v0.27.0
UpdateAckLevel updates replication queue ack level
func (*TestBase) UpdateAllMutableState ¶
func (s *TestBase) UpdateAllMutableState(updatedMutableState *persistencespb.WorkflowMutableState, condition int64) error
UpdateAllMutableState is a utility method to update workflow execution
func (*TestBase) UpdateNamespaceDLQAckLevel ¶ added in v0.27.0
UpdateNamespaceDLQAckLevel updates namespace dlq ack level
func (*TestBase) UpdateShard ¶
func (s *TestBase) UpdateShard(updatedInfo *persistencespb.ShardInfo, previousRangeID int64) error
UpdateShard is a utility method to update the shard using persistence layer
func (*TestBase) UpdateWorkflowExecution ¶
func (s *TestBase) UpdateWorkflowExecution(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, nextEventID int64, workflowTaskScheduleIDs []int64, activityScheduleIDs []int64, condition int64, timerTasks []tasks.Task, upsertActivityInfos []*persistencespb.ActivityInfo, deleteActivityInfos []int64, upsertTimerInfos []*persistencespb.TimerInfo, deleteTimerInfos []string) error
UpdateWorkflowExecution is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionAndFinish ¶
func (s *TestBase) UpdateWorkflowExecutionAndFinish(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, nextEventID int64, condition int64) error
UpdateWorkflowExecutionAndFinish is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionForBufferEvents ¶
func (s *TestBase) UpdateWorkflowExecutionForBufferEvents( updatedInfo *persistencespb.WorkflowExecutionInfo, updatedNextEventID, condition int64, bufferEvents []*historypb.HistoryEvent, clearBufferedEvents bool) error
UpdateWorkflowExecutionForBufferEvents is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionForChildExecutionsInitiated ¶
func (s *TestBase) UpdateWorkflowExecutionForChildExecutionsInitiated( updatedInfo *persistencespb.WorkflowExecutionInfo, updatedNextEventID int64, condition int64, transferTasks []tasks.Task, childInfos []*persistencespb.ChildExecutionInfo) error
UpdateWorkflowExecutionForChildExecutionsInitiated is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionForRequestCancel ¶
func (s *TestBase) UpdateWorkflowExecutionForRequestCancel( updatedInfo *persistencespb.WorkflowExecutionInfo, updatedNextEventID int64, condition int64, transferTasks []tasks.Task, upsertRequestCancelInfo []*persistencespb.RequestCancelInfo) error
UpdateWorkflowExecutionForRequestCancel is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionForSignal ¶
func (s *TestBase) UpdateWorkflowExecutionForSignal( updatedInfo *persistencespb.WorkflowExecutionInfo, updatedNextEventID int64, condition int64, transferTasks []tasks.Task, upsertSignalInfos []*persistencespb.SignalInfo) error
UpdateWorkflowExecutionForSignal is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionWithRangeID ¶
func (s *TestBase) UpdateWorkflowExecutionWithRangeID(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, nextEventID int64, workflowTaskScheduleIDs []int64, activityScheduleIDs []int64, rangeID, condition int64, timerTasks []tasks.Task, upsertActivityInfos []*persistencespb.ActivityInfo, deleteActivityInfos []int64, upsertTimerInfos []*persistencespb.TimerInfo, deleteTimerInfos []string, upsertChildInfos []*persistencespb.ChildExecutionInfo, deleteChildInfos []int64, upsertCancelInfos []*persistencespb.RequestCancelInfo, deleteCancelInfos []int64, upsertSignalInfos []*persistencespb.SignalInfo, deleteSignalInfos []int64, upsertSignalRequestedIDs []string, deleteSignalRequestedIDs []string) error
UpdateWorkflowExecutionWithRangeID is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionWithReplication ¶
func (s *TestBase) UpdateWorkflowExecutionWithReplication(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, nextEventID int64, workflowTaskScheduleIDs []int64, activityScheduleIDs []int64, rangeID, condition int64, timerTasks []tasks.Task, txTasks []tasks.Task, upsertActivityInfos []*persistencespb.ActivityInfo, deleteActivityInfos []int64, upsertTimerInfos []*persistencespb.TimerInfo, deleteTimerInfos []string, upsertChildInfos []*persistencespb.ChildExecutionInfo, deleteChildInfos []int64, upsertCancelInfos []*persistencespb.RequestCancelInfo, deleteCancelInfos []int64, upsertSignalInfos []*persistencespb.SignalInfo, deleteSignalInfos []int64, upsertSignalRequestedIDs []string, deleteSignalRequestedIDs []string) error
UpdateWorkflowExecutionWithReplication is a utility method to update workflow execution
func (*TestBase) UpdateWorkflowExecutionWithTransferTasks ¶
func (s *TestBase) UpdateWorkflowExecutionWithTransferTasks( updatedInfo *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, updatedNextEventID int64, condition int64, transferTasks []tasks.Task, upsertActivityInfo []*persistencespb.ActivityInfo) error
UpdateWorkflowExecutionWithTransferTasks is a utility method to update workflow execution
func (*TestBase) UpdateWorklowStateAndReplication ¶
func (s *TestBase) UpdateWorklowStateAndReplication(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, nextEventID int64, condition int64, txTasks []tasks.Task) error
UpdateWorklowStateAndReplication is a utility method to update workflow execution
func (*TestBase) UpsertChildExecutionsState ¶
func (s *TestBase) UpsertChildExecutionsState(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, nextEventID int64, condition int64, upsertChildInfos []*persistencespb.ChildExecutionInfo) error
UpsertChildExecutionsState is a utility method to update mutable state of workflow execution
func (*TestBase) UpsertRequestCancelState ¶
func (s *TestBase) UpsertRequestCancelState(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, nextEventID int64, condition int64, upsertCancelInfos []*persistencespb.RequestCancelInfo) error
UpsertRequestCancelState is a utility method to update mutable state of workflow execution
func (*TestBase) UpsertSignalInfoState ¶
func (s *TestBase) UpsertSignalInfoState(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, nextEventID int64, condition int64, upsertSignalInfos []*persistencespb.SignalInfo) error
UpsertSignalInfoState is a utility method to update mutable state of workflow execution
func (*TestBase) UpsertSignalsRequestedState ¶
func (s *TestBase) UpsertSignalsRequestedState(updatedInfo *persistencespb.WorkflowExecutionInfo, updatedState *persistencespb.WorkflowExecutionState, nextEventID int64, condition int64, upsertSignalsRequested []string) error
UpsertSignalsRequestedState is a utility method to update mutable state of workflow execution
type TestBaseOptions ¶
type TestBaseOptions struct { SQLDBPluginName string DBName string DBUsername string DBPassword string DBHost string DBPort int `yaml:"-"` ConnectAttributes map[string]string StoreType string `yaml:"-"` SchemaDir string `yaml:"-"` FaultInjection *config.FaultInjection `yaml:"faultinjection"` }
TestBaseOptions options to configure workflow test base.
func GetMySQLTestClusterOption ¶ added in v1.1.0
func GetMySQLTestClusterOption() *TestBaseOptions
GetMySQLTestClusterOption return test options
func GetPostgreSQLTestClusterOption ¶ added in v1.1.0
func GetPostgreSQLTestClusterOption() *TestBaseOptions
GetPostgreSQLTestClusterOption return test options
func GetSQLiteTestClusterOption ¶ added in v1.15.0
func GetSQLiteTestClusterOption() *TestBaseOptions
GetSQLiteTestClusterOption return test options
type TestTransferTaskIDGenerator ¶
type TestTransferTaskIDGenerator struct {
// contains filtered or unexported fields
}
TestTransferTaskIDGenerator helper
func (*TestTransferTaskIDGenerator) GenerateTransferTaskID ¶ added in v0.7.0
func (g *TestTransferTaskIDGenerator) GenerateTransferTaskID() (int64, error)
GenerateTransferTaskID helper
func (*TestTransferTaskIDGenerator) GenerateTransferTaskIDs ¶ added in v0.7.0
func (g *TestTransferTaskIDGenerator) GenerateTransferTaskIDs(number int) ([]int64, error)
GenerateTransferTaskIDs helper
type TransferTaskIDGenerator ¶
TransferTaskIDGenerator generates IDs for transfer tasks written by helper methods