Skip to content

Commit

Permalink
Fix flakiness in TestDisruptions for two pc testing (#17106)
Browse files Browse the repository at this point in the history
Signed-off-by: Manan Gupta <[email protected]>
  • Loading branch information
GuptaManan100 authored Nov 4, 2024
1 parent fdf529e commit 1e2f15b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion go/test/endtoend/cluster/vtctldclient_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down
4 changes: 4 additions & 0 deletions go/test/endtoend/transaction/twopc/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand Down

0 comments on commit 1e2f15b

Please sign in to comment.