diff --git a/go/test/endtoend/cluster/vtctldclient_process.go b/go/test/endtoend/cluster/vtctldclient_process.go index 55f04e021c9..892f03e27fe 100644 --- a/go/test/endtoend/cluster/vtctldclient_process.go +++ b/go/test/endtoend/cluster/vtctldclient_process.go @@ -195,7 +195,9 @@ func (vtctldclient *VtctldClientProcess) PlannedReparentShard(Keyspace string, S output, err := vtctldclient.ExecuteCommandWithOutput( "PlannedReparentShard", fmt.Sprintf("%s/%s", Keyspace, Shard), - "--new-primary", alias) + "--new-primary", alias, + "--wait-replicas-timeout", "30s", + ) if err != nil { log.Errorf("error in PlannedReparentShard output %s, err %s", output, err.Error()) } diff --git a/go/test/endtoend/transaction/twopc/utils/utils.go b/go/test/endtoend/transaction/twopc/utils/utils.go index 067877c4ece..695dd0dd93f 100644 --- a/go/test/endtoend/transaction/twopc/utils/utils.go +++ b/go/test/endtoend/transaction/twopc/utils/utils.go @@ -221,6 +221,10 @@ func AddShards(t *testing.T, clusterInstance *cluster.LocalProcessCluster, keysp shard, err := clusterInstance.AddShard(keyspaceName, shardName, 3, false, nil) require.NoError(t, err) clusterInstance.Keyspaces[0].Shards = append(clusterInstance.Keyspaces[0].Shards, *shard) + for _, vttablet := range shard.Vttablets { + err = vttablet.VttabletProcess.WaitForTabletStatuses([]string{"SERVING"}) + require.NoError(t, err) + } } }