Skip to content

Commit

Permalink
Fix new vtctl upgrade downgrade test on release-16.0 (#13252)
Browse files Browse the repository at this point in the history
* skip test assertion if binary above 16

Signed-off-by: Florent Poinsard <[email protected]>

* Add result filtering for warning for vtconfig error

Signed-off-by: Florent Poinsard <[email protected]>

* Revert change

Signed-off-by: Florent Poinsard <[email protected]>

* filter result for warning

Signed-off-by: Florent Poinsard <[email protected]>

---------

Signed-off-by: Florent Poinsard <[email protected]>
  • Loading branch information
frouioui authored Jun 7, 2023
1 parent 17fae95 commit 625c057
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
14 changes: 12 additions & 2 deletions go/test/endtoend/cluster/cluster_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,22 @@ func getTablet(tabletGrpcPort int, hostname string) *topodatapb.Tablet {
func filterResultForWarning(input string) string {
lines := strings.Split(input, "\n")
var result string
for _, line := range lines {
for i, line := range lines {
if strings.Contains(line, "WARNING: vtctl should only be used for VDiff v1 workflows. Please use VDiff v2 and consider using vtctldclient for all other commands.") {
continue
}
result = result + line + "\n"

if strings.Contains(line, "Failed to read in config") && strings.Contains(line, `Config File "vtconfig" Not Found in`) {
continue
}

result += line

if i < len(lines)-1 {
result += "\n"
}
}

return result
}

Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/cluster/vtctlclient_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (vtctlclient *VtctlClientProcess) ExecuteCommandWithOutput(args ...string)
}
time.Sleep(retryDelay)
}
return filterResultWhenRunsForCoverage(resultStr), err
return filterResultForWarning(filterResultWhenRunsForCoverage(resultStr)), err
}

// VtctlClientProcessInstance returns a VtctlProcess handle for vtctlclient process
Expand Down
8 changes: 4 additions & 4 deletions go/test/endtoend/reparent/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var (
replicationWaitTimeout = time.Duration(15 * time.Second)
)

//region cluster setup/teardown
// region cluster setup/teardown

// SetupReparentCluster is used to setup the reparent cluster
func SetupReparentCluster(t *testing.T, durability string) *cluster.LocalProcessCluster {
Expand Down Expand Up @@ -133,7 +133,7 @@ func setupCluster(ctx context.Context, t *testing.T, shardName string, cells []s
err = clusterInstance.SetupCluster(keyspace, []cluster.Shard{*shard})
require.NoError(t, err, "Cannot launch cluster")

//Start MySql
// Start MySql
var mysqlCtlProcessList []*exec.Cmd
for _, shard := range clusterInstance.Keyspaces[0].Shards {
for _, tablet := range shard.Vttablets {
Expand Down Expand Up @@ -234,7 +234,7 @@ func StartNewVTTablet(t *testing.T, clusterInstance *cluster.LocalProcessCluster
return tablet
}

//endregion
// endregion

// region database queries
func getMysqlConnParam(tablet *cluster.Vttablet) mysql.ConnParams {
Expand Down Expand Up @@ -262,7 +262,7 @@ func execute(t *testing.T, conn *mysql.Conn, query string) *sqltypes.Result {
return qr
}

//endregion
// endregion

// region ers, prs

Expand Down

0 comments on commit 625c057

Please sign in to comment.