Skip to content

Commit 5880d76

Browse files
committed
test: now that we are running multiple keyspaces, specify it in the onlineddl queries to see the status
Signed-off-by: Manan Gupta <[email protected]>
1 parent 2255679 commit 5880d76

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

go/test/endtoend/onlineddl/vtgate_util.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ func CheckForceMigrationCutOver(t *testing.T, vtParams *mysql.ConnParams, shards
257257

258258
// CheckMigrationStatus verifies that the migration indicated by given UUID has the given expected status
259259
func CheckMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, expectStatuses ...schema.OnlineDDLStatus) bool {
260-
query, err := sqlparser.ParseAndBind("show vitess_migrations like %a",
260+
ksName := shards[0].PrimaryTablet().VttabletProcess.Keyspace
261+
query, err := sqlparser.ParseAndBind(fmt.Sprintf("show vitess_migrations from %s like %%a", ksName),
261262
sqltypes.StringBindVariable(uuid),
262263
)
263264
require.NoError(t, err)

go/test/endtoend/transaction/twopc/stress/stress_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ func waitForMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []c
338338
for _, shard := range shards {
339339
shardNames[shard.Name] = true
340340
}
341-
query := fmt.Sprintf("show vitess_migrations like '%s'", uuid)
341+
query := fmt.Sprintf("show vitess_migrations from %s like '%s'", keyspaceName, uuid)
342342

343343
statusesMap := map[string]bool{}
344344
for _, status := range expectStatuses {

0 commit comments

Comments
 (0)