Skip to content

Commit

Permalink
Flaky test fix: TestMoveTablesSharded and TestMoveTablesUnsharded (#1…
Browse files Browse the repository at this point in the history
…7343)

Signed-off-by: Rohit Nayak <[email protected]>
  • Loading branch information
vitess-bot[bot] authored and vitess-bot committed Dec 10, 2024
1 parent 656f35c commit 76d52be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions go/vt/vttablet/tabletmanager/rpc_vreplication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ func TestCreateVReplicationWorkflow(t *testing.T) {
// results returned. Followed by ensuring that SwitchTraffic
// and ReverseTraffic also work as expected.
func TestMoveTablesUnsharded(t *testing.T) {
t.Skip("Skipping test temporarily as it is flaky on CI, pending investigation")
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
sourceKs := "sourceks"
Expand Down Expand Up @@ -400,6 +399,9 @@ func TestMoveTablesUnsharded(t *testing.T) {
ftc.vrdbClient.AddInvariant(getCopyStateQuery, &sqltypes.Result{})
tenv.tmc.setVReplicationExecResults(ftc.tablet, getCopyState, &sqltypes.Result{})
ftc.vrdbClient.ExpectRequest(fmt.Sprintf(readAllWorkflows, tenv.dbName, ""), &sqltypes.Result{}, nil)
for _, table := range defaultSchema.TableDefinitions {
tenv.db.AddQuery(fmt.Sprintf(getNonEmptyTableQuery, table.Name), &sqltypes.Result{})

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Code Coverage

tenv.db undefined (type *testEnv has no field or method db)

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Code Coverage

undefined: getNonEmptyTableQuery

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql57)

tenv.db undefined (type *testEnv has no field or method db)

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql57)

undefined: getNonEmptyTableQuery

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Static Code Checks Etc

tenv.db undefined (type *testEnv has no field or method db)

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Static Code Checks Etc

undefined: getNonEmptyTableQuery (typecheck)

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Unit Test (Race)

tenv.db undefined (type *testEnv has no field or method db)

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Unit Test (Race)

undefined: getNonEmptyTableQuery

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql80)

tenv.db undefined (type *testEnv has no field or method db)

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql80)

undefined: getNonEmptyTableQuery

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql84)

tenv.db undefined (type *testEnv has no field or method db)

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Unit Test (mysql84)

undefined: getNonEmptyTableQuery

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Code Coverage

tenv.db undefined (type *testEnv has no field or method db)

Check failure on line 403 in go/vt/vttablet/tabletmanager/rpc_vreplication_test.go

View workflow job for this annotation

GitHub Actions / Code Coverage

undefined: getNonEmptyTableQuery
}
insert := fmt.Sprintf(`%s values ('%s', 'keyspace:"%s" shard:"%s" filter:{rules:{match:"t1" filter:"select * from t1"}}', '', 0, 0, '%s', 'primary,replica,rdonly', now(), 0, 'Stopped', '%s', %d, 0, 0, '{}')`,
insertVReplicationPrefix, wf, sourceKs, sourceShard, tenv.cells[0], tenv.dbName, vreplID)
ftc.vrdbClient.ExpectRequest(insert, &sqltypes.Result{InsertID: 1}, nil)
Expand Down Expand Up @@ -1764,7 +1766,7 @@ func addInvariants(dbClient *binlogplayer.MockDBClient, vreplID, sourceTabletUID
"0",
))
dbClient.AddInvariant(fmt.Sprintf(updatePickedSourceTablet, cell, sourceTabletUID, vreplID), &sqltypes.Result{})

dbClient.AddInvariant("update _vt.vreplication set state='Running', message='' where id=1", &sqltypes.Result{})
}

func addMaterializeSettingsTablesToSchema(ms *vtctldatapb.MaterializeSettings, tenv *testEnv, venv *vtenv.Environment) {
Expand Down

0 comments on commit 76d52be

Please sign in to comment.