Skip to content

Commit

Permalink
more getting the tests in sync with v15
Browse files Browse the repository at this point in the history
  • Loading branch information
maksimov committed Sep 9, 2024
1 parent 2630c29 commit cd4c20f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions go/test/endtoend/vreplication/vreplication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,9 @@ func shardCustomer(t *testing.T, testReverse bool, cells []*Cell, sourceCellOrAl
productTab := vc.Cells[defaultCell.Name].Keyspaces["product"].Shards["0"].Tablets["zone1-100"].Vttablet

// Wait to finish the copy phase for all tables
catchup(t, customerTab1, workflow, "MoveTables")
catchup(t, customerTab2, workflow, "MoveTables")
workflowType := "MoveTables"
catchup(t, customerTab1, workflow, workflowType)
catchup(t, customerTab2, workflow, workflowType)

// Confirm that the 0 scale decimal field, dec80, is replicated correctly
dec80Replicated := false
Expand Down Expand Up @@ -623,7 +624,7 @@ func shardCustomer(t *testing.T, testReverse bool, cells []*Cell, sourceCellOrAl
}

vdiff1(t, ksWorkflow, "")
switchReadsDryRun(t, allCellNames, ksWorkflow, dryRunResultsReadCustomerShard)
switchReadsDryRun(t, workflowType, allCellNames, ksWorkflow, dryRunResultsReadCustomerShard)
switchReads(t, allCellNames, ksWorkflow)
require.True(t, validateThatQueryExecutesOnTablet(t, vtgateConn, productTab, "customer", query, query))

Expand Down Expand Up @@ -851,7 +852,8 @@ func reshard(t *testing.T, ksName string, tableName string, workflow string, sou
t.Fatal(err)
}
}
if err := vc.VtctlClient.ExecuteCommand("Reshard", "--", "--v1", "--cells="+sourceCellOrAlias, "--tablet_types=replica,primary", ksWorkflow, "--", sourceShards, targetShards); err != nil {
workflowType := "Reshard"
if err := vc.VtctlClient.ExecuteCommand(workflowType, "--", "--v1", "--cells="+sourceCellOrAlias, "--tablet_types=replica,primary", ksWorkflow, "--", sourceShards, targetShards); err != nil {
t.Fatalf("Reshard command failed with %+v\n", err)
}
tablets := vc.getVttabletsInKeyspace(t, defaultCell, ksName, "primary")
Expand All @@ -869,7 +871,7 @@ func reshard(t *testing.T, ksName string, tableName string, workflow string, sou
if dryRunResultSwitchReads != nil {
switchReadsDryRun(t, workflowType, allCellNames, ksWorkflow, dryRunResultSwitchReads)
}
switchReads(t, workflowType, allCellNames, ksWorkflow, false)
switchReads(t, allCellNames, ksWorkflow)
if dryRunResultSwitchWrites != nil {
switchWritesDryRun(t, ksWorkflow, dryRunResultSwitchWrites)
}
Expand Down

0 comments on commit cd4c20f

Please sign in to comment.