From 5880d765f5c3a569e5e22d22b625615753de0fc0 Mon Sep 17 00:00:00 2001 From: Manan Gupta Date: Mon, 2 Sep 2024 16:22:56 +0530 Subject: [PATCH] test: now that we are running multiple keyspaces, specify it in the onlineddl queries to see the status Signed-off-by: Manan Gupta --- go/test/endtoend/onlineddl/vtgate_util.go | 3 ++- go/test/endtoend/transaction/twopc/stress/stress_test.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go/test/endtoend/onlineddl/vtgate_util.go b/go/test/endtoend/onlineddl/vtgate_util.go index 6c26320b472..639b3ce8eb4 100644 --- a/go/test/endtoend/onlineddl/vtgate_util.go +++ b/go/test/endtoend/onlineddl/vtgate_util.go @@ -257,7 +257,8 @@ func CheckForceMigrationCutOver(t *testing.T, vtParams *mysql.ConnParams, shards // CheckMigrationStatus verifies that the migration indicated by given UUID has the given expected status func CheckMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, expectStatuses ...schema.OnlineDDLStatus) bool { - query, err := sqlparser.ParseAndBind("show vitess_migrations like %a", + ksName := shards[0].PrimaryTablet().VttabletProcess.Keyspace + query, err := sqlparser.ParseAndBind(fmt.Sprintf("show vitess_migrations from %s like %%a", ksName), sqltypes.StringBindVariable(uuid), ) require.NoError(t, err) diff --git a/go/test/endtoend/transaction/twopc/stress/stress_test.go b/go/test/endtoend/transaction/twopc/stress/stress_test.go index 56b6832d1c7..5baee342bec 100644 --- a/go/test/endtoend/transaction/twopc/stress/stress_test.go +++ b/go/test/endtoend/transaction/twopc/stress/stress_test.go @@ -338,7 +338,7 @@ func waitForMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []c for _, shard := range shards { shardNames[shard.Name] = true } - query := fmt.Sprintf("show vitess_migrations like '%s'", uuid) + query := fmt.Sprintf("show vitess_migrations from %s like '%s'", keyspaceName, uuid) statusesMap := map[string]bool{} for _, status := range expectStatuses {