Documentation ¶
Index ¶
- func CheckCancelAllMigrations(t *testing.T, vtParams *mysql.ConnParams, expectCount int)
- func CheckCancelAllMigrationsViaVtctl(t *testing.T, vtctlclient *cluster.VtctlClientProcess, keyspace string)
- func CheckCancelMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, ...)
- func CheckCleanupMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string)
- func CheckCompleteAllMigrations(t *testing.T, vtParams *mysql.ConnParams, expectCount int)
- func CheckCompleteMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, ...)
- func CheckLaunchAllMigrations(t *testing.T, vtParams *mysql.ConnParams, expectCount int)
- func CheckLaunchMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, ...)
- func CheckMigrationArtifacts(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, ...)
- func CheckMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, ...)
- func CheckRetryMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, ...)
- func CheckRetryPartialMigration(t *testing.T, vtParams *mysql.ConnParams, uuid string, ...)
- func CheckThrottledApps(t *testing.T, vtParams *mysql.ConnParams, appName string, expectFind bool)
- func CreateTempScript(t *testing.T, content string) (fileName string)
- func GetMySQLVersion(t *testing.T, tablet *cluster.Vttablet) string
- func MysqlClientExecFile(t *testing.T, mysqlParams *mysql.ConnParams, testDataPath, testName string, ...) (output string)
- func PrintQueryResult(writer io.Writer, qr *sqltypes.Result)
- func ReadMigrationLogs(t *testing.T, vtParams *mysql.ConnParams, uuid string) (logs []string)
- func ReadMigrations(t *testing.T, vtParams *mysql.ConnParams, like string) *sqltypes.Result
- func ThrottleAllMigrations(t *testing.T, vtParams *mysql.ConnParams)
- func UnthrottleAllMigrations(t *testing.T, vtParams *mysql.ConnParams)
- func ValidateCompletedTimestamp(t *testing.T, vtParams *mysql.ConnParams)
- func ValidateSequentialMigrationIDs(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard)
- func VtgateExecDDL(t *testing.T, vtParams *mysql.ConnParams, ddlStrategy string, query string, ...) *sqltypes.Result
- func VtgateExecQuery(t *testing.T, vtParams *mysql.ConnParams, query string, expectError string) *sqltypes.Result
- func WaitForMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, ...) schema.OnlineDDLStatus
- func WaitForThrottledTimestamp(t *testing.T, vtParams *mysql.ConnParams, uuid string, timeout time.Duration) (row sqltypes.RowNamedValues, startedTimestamp string, ...)
- func WaitForThrottlerStatusEnabled(t *testing.T, tablet *cluster.Vttablet, timeout time.Duration)
- func WaitForVReplicationStatus(t *testing.T, tablet *cluster.Vttablet, uuid string, timeout time.Duration, ...) (status string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCancelAllMigrations ¶
func CheckCancelAllMigrations(t *testing.T, vtParams *mysql.ConnParams, expectCount int)
CheckCancelAllMigrations cancels all pending migrations and expect number of affected rows A negative value for expectCount indicates "don't care, no need to check"
func CheckCancelAllMigrationsViaVtctl ¶ added in v0.13.0
func CheckCancelAllMigrationsViaVtctl(t *testing.T, vtctlclient *cluster.VtctlClientProcess, keyspace string)
CheckCancelAllMigrations cancels all pending migrations. There is no validation for affected migrations.
func CheckCancelMigration ¶
func CheckCancelMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, expectCancelPossible bool)
CheckCancelMigration attempts to cancel a migration, and expects success/failure by counting affected rows
func CheckCleanupMigration ¶ added in v0.13.0
func CheckCleanupMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string)
CheckCleanupMigration attempts to cleanup a migration, and expects success by counting affected rows
func CheckCompleteAllMigrations ¶ added in v0.15.0
func CheckCompleteAllMigrations(t *testing.T, vtParams *mysql.ConnParams, expectCount int)
CheckCompleteAllMigrations completes all pending migrations and expect number of affected rows A negative value for expectCount indicates "don't care, no need to check"
func CheckCompleteMigration ¶ added in v0.13.0
func CheckCompleteMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, expectCompletePossible bool)
CheckCompleteMigration attempts to complete a migration, and expects success by counting affected rows
func CheckLaunchAllMigrations ¶ added in v0.15.0
func CheckLaunchAllMigrations(t *testing.T, vtParams *mysql.ConnParams, expectCount int)
CheckLaunchAllMigrations launches all queued posponed migrations and expect number of affected rows A negative value for expectCount indicates "don't care, no need to check"
func CheckLaunchMigration ¶ added in v0.15.0
func CheckLaunchMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, launchShards string, expectLaunchPossible bool)
CheckLaunchMigration attempts to launch a migration, and expects success by counting affected rows
func CheckMigrationArtifacts ¶
func CheckMigrationArtifacts(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, expectArtifacts bool)
CheckMigrationArtifacts verifies given migration exists, and checks if it has artifacts
func CheckMigrationStatus ¶
func CheckMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, expectStatuses ...schema.OnlineDDLStatus)
CheckMigrationStatus verifies that the migration indicated by given UUID has the given expected status
func CheckRetryMigration ¶
func CheckRetryMigration(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, expectRetryPossible bool)
CheckRetryMigration attempts to retry a migration, and expects success/failure by counting affected rows
func CheckRetryPartialMigration ¶ added in v0.14.2
func CheckRetryPartialMigration(t *testing.T, vtParams *mysql.ConnParams, uuid string, expectAtLeastRowsAffected uint64)
CheckRetryPartialMigration attempts to retry a migration where a subset of shards failed
func CheckThrottledApps ¶ added in v0.14.0
CheckThrottledApps checks for existence or non-existence of an app in the throttled apps list
func CreateTempScript ¶ added in v0.11.0
CreateTempScript creates a script in the temporary directory with given content
func GetMySQLVersion ¶ added in v0.14.0
func MysqlClientExecFile ¶ added in v0.11.0
func MysqlClientExecFile(t *testing.T, mysqlParams *mysql.ConnParams, testDataPath, testName string, fileName string) (output string)
MysqlClientExecFile runs a file through the mysql client
func PrintQueryResult ¶
PrintQueryResult will pretty-print a QueryResult to the logger.
func ReadMigrationLogs ¶ added in v0.11.0
ReadMigrationLogs reads migration logs for a given migration, on all shards
func ReadMigrations ¶ added in v0.11.0
ReadMigrations reads migration entries
func ThrottleAllMigrations ¶ added in v0.14.0
func ThrottleAllMigrations(t *testing.T, vtParams *mysql.ConnParams)
ThrottleAllMigrations fully throttles online-ddl apps
func UnthrottleAllMigrations ¶ added in v0.14.0
func UnthrottleAllMigrations(t *testing.T, vtParams *mysql.ConnParams)
UnthrottleAllMigrations cancels migration throttling
func ValidateCompletedTimestamp ¶ added in v0.15.5
func ValidateCompletedTimestamp(t *testing.T, vtParams *mysql.ConnParams)
ValidateCompletedTimestamp ensures that any migration in `cancelled`, `completed`, `failed` statuses has a non-nil and valid `completed_timestamp` value.
func ValidateSequentialMigrationIDs ¶ added in v0.15.5
func ValidateSequentialMigrationIDs(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard)
ValidateSequentialMigrationIDs validates that schem_migrations.id column, which is an AUTO_INCREMENT, does not have gaps
func VtgateExecDDL ¶
func VtgateExecDDL(t *testing.T, vtParams *mysql.ConnParams, ddlStrategy string, query string, expectError string) *sqltypes.Result
VtgateExecDDL executes a DDL query with given strategy
func VtgateExecQuery ¶
func VtgateExecQuery(t *testing.T, vtParams *mysql.ConnParams, query string, expectError string) *sqltypes.Result
VtgateExecQuery runs a query on VTGate using given query params
func WaitForMigrationStatus ¶ added in v0.11.0
func WaitForMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, timeout time.Duration, expectStatuses ...schema.OnlineDDLStatus) schema.OnlineDDLStatus
WaitForMigrationStatus waits for a migration to reach either provided statuses (returns immediately), or eventually time out
func WaitForThrottledTimestamp ¶ added in v0.14.2
func WaitForThrottledTimestamp(t *testing.T, vtParams *mysql.ConnParams, uuid string, timeout time.Duration) ( row sqltypes.RowNamedValues, startedTimestamp string, lastThrottledTimestamp string, )
WaitForThrottledTimestamp waits for a migration to have a non-empty last_throttled_timestamp
func WaitForThrottlerStatusEnabled ¶ added in v0.16.1
WaitForThrottlerStatusEnabled waits for a tablet to report its throttler status as enabled.
Types ¶
This section is empty.