utils

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugDelayCommitShard = "VT_DELAY_COMMIT_SHARD"
	DebugDelayCommitTime  = "VT_DELAY_COMMIT_TIME"
)

Variables

This section is empty.

Functions

func AddShards

func AddShards(t *testing.T, clusterInstance *cluster.LocalProcessCluster, keyspaceName string, shardNames []string)

func ClearOutTable

func ClearOutTable(t *testing.T, vtParams mysql.ConnParams, tableName string)

ClearOutTable deletes everything from a table. Sometimes the table might have more rows than allowed in a single delete query, so we have to do the deletions iteratively.

func DeleteFile

func DeleteFile(fileName string)

DeleteFile deletes the file specified.

func RunReshard

func RunReshard(t *testing.T, clusterInstance *cluster.LocalProcessCluster, workflowName, keyspaceName string, sourceShards, targetShards string) error

func WaitForMigrationStatus

func WaitForMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, ks string, shards []cluster.Shard, uuid string, timeout time.Duration, expectStatuses ...schema.OnlineDDLStatus) schema.OnlineDDLStatus

func WaitForResults

func WaitForResults(t *testing.T, vtParams *mysql.ConnParams, query string, resultExpected string, waitTime time.Duration)

WaitForResults waits for the results of the query to be as expected.

func WriteTestCommunicationFile

func WriteTestCommunicationFile(t *testing.T, fileName string, content string)

WriteTestCommunicationFile writes the content to the file with the given name. We use these files to coordinate with the vttablets running in the debug mode.

Types

This section is empty.

Jump to

Keyboard shortcuts

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