From 1cb43c5aa870279d624359381113455bac6c4cf4 Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Thu, 2 Jan 2025 19:18:38 -0500 Subject: [PATCH] Fix vtgate/reference test Signed-off-by: Matt Lord --- go/test/endtoend/vreplication/vstream_test.go | 2 ++ go/test/endtoend/vtgate/queries/reference/main_test.go | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/go/test/endtoend/vreplication/vstream_test.go b/go/test/endtoend/vreplication/vstream_test.go index 8079c968ebb..7009bade562 100644 --- a/go/test/endtoend/vreplication/vstream_test.go +++ b/go/test/endtoend/vreplication/vstream_test.go @@ -654,6 +654,8 @@ func TestMultiVStreamsKeyspaceReshard(t *testing.T) { // Confirm that we have shard GTIDs for the global shard and the old/original shards. require.Len(t, newVGTID.GetShardGtids(), 3) + waitForWorkflowState(t, vc, fmt.Sprintf("%s.%s", ks, wf), binlogdatapb.VReplicationWorkflowState_Running.String()) + // Switch the traffic to the new shards. reshardAction(t, "SwitchTraffic", wf, ks, oldShards, newShards, defaultCellName, tabletType) diff --git a/go/test/endtoend/vtgate/queries/reference/main_test.go b/go/test/endtoend/vtgate/queries/reference/main_test.go index 9a06fbf55fb..95e19ef596a 100644 --- a/go/test/endtoend/vtgate/queries/reference/main_test.go +++ b/go/test/endtoend/vtgate/queries/reference/main_test.go @@ -161,7 +161,7 @@ func TestMain(m *testing.M) { "--target-keyspace", shardedKeyspaceName, "create", "--source-keyspace", unshardedKeyspaceName, - "--table-settings", `'[{"target_table": "zip_detail", "source_expression": "select * from zip_detail", "create_ddl": "copy" }]'`, + "--table-settings", `[{"target_table": "zip_detail", "source_expression": "select * from zip_detail", "create_ddl": "copy" }]`, "--tablet-types", "PRIMARY", ) fmt.Fprintf(os.Stderr, "Output from materialize: %s\n", output) @@ -207,8 +207,9 @@ func TestMain(m *testing.M) { err = clusterInstance.VtctldClientProcess.ExecuteCommand( "Workflow", "--keyspace", shardedKeyspaceName, - "--workflow", "copy_zip_detail", "delete", + "--workflow", "copy_zip_detail", + "--keep-data", ) if err != nil { fmt.Fprintf(os.Stderr, "Failed to stop materialization workflow: %v", err)