package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev

# Functions

CreateSubTask adds a new task to subtask table.
DeleteSubtasksByTaskID deletes the subtask of the given task ID.
GetCommonCleanUpRoutine returns a common cleanup routine.
GetCommonStepExecutor returns one mock subtaskExecutor.
GetCommonTaskExecutorExt returns a common task executor extension.
GetMockBasicSchedulerExt returns mock scheduler.Extension with basic functionalities.
GetMockHATestSchedulerExt returns mock scheduler.Extension for HA testing with multiple steps.
GetMockRollbackSchedulerExt returns mock scheduler.Extension which will generate rollback subtasks.
GetMockSchedulerExt returns mock scheduler.Extension with input stepInfos.
GetOneTask get a task from task table.
GetPlanErrSchedulerExt returns mock scheduler.Extension which will generate error when planning.
GetPlanNotRetryableErrSchedulerExt returns mock scheduler.Extension which will generate non retryable error when planning.
GetStepTwoPlanNotRetryableErrSchedulerExt returns mock scheduler.Extension which will generate non retryable error when planning for step two.
GetSubtaskEndTime gets subtask's endTime for test.
GetSubtaskNodes gets nodes that are running or have run the task for test.
GetSubtasksByTaskID gets subtasks by taskID for test.
GetSubtasksFromHistory gets subtasks from history table for test.
GetSubtasksFromHistoryByTaskID gets subtasks by taskID from history table for test.
GetTaskEndTime gets task's endTime for test.
GetTasksFromHistory gets tasks from history table for test.
GetTasksFromHistoryInStates gets the tasks in history table in the states.
InitTableTest inits needed components for table_test.
InitTableTestWithCancel inits needed components with context.CancelFunc for table_test.
InitTaskExecutor inits all mock components for TaskExecutor.
InsertSubtask adds a new subtask of any state to subtask table.
IsTaskCancelling checks whether the task state is cancelling.
NewDXFContextWithRandomNodes creates a new TestDXFContext with random number of nodes in range [minCnt, maxCnt].
NewTestDXFContext creates a new TestDXFContext.
PrintSubtaskInfo log the subtask info by taskKey for test.
ReduceCheckInterval reduces the check interval for test.
RegisterExampleTask register example task.
RegisterTaskTypeForRollback register rollback task meta.
SubmitAndWaitTask schedule one task.
TransferSubTasks2History move subtasks from tidb_background_subtask to tidb_background_subtask_history.
UpdateSubtaskExecID updates the subtask's exec_id, used for testing now.
WaitTaskDone wait task done.
WaitTaskDoneOrPaused wait task done or paused.

# Structs

SchedulerInfo is used for mocking scheduler.Extension.
StepInfo is used for mocking scheduler.Extension.
TestContext defines shared variables for disttask tests.
TestDXFContext is the context for testing DXF.