Skip to content

Commit

Permalink
roachtest: deflake autoupgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
tbg committed Mar 24, 2023
1 parent bbc5ec1 commit 4fd268d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/cmd/roachtest/tests/autoupgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ func registerAutoUpgrade(r registry.Registry) {

clusterVersion := func() (string, error) {
var version string
if err := db.QueryRowContext(ctx, `SHOW CLUSTER SETTING version`).Scan(&version); err != nil {
// NB:`SHOW CLUSTER SETTING version` can block when in the middle of
// migrating and then fail because it has an internal timeout.
// See: https://github.com/cockroachdb/cockroach/issues/99115
if err := db.QueryRowContext(ctx, `SELECT value FROM [SHOW CLUSTER SETTINGS] WHERE variable='version'`).Scan(&version); err != nil {
return "", errors.Wrap(err, "determining cluster version")
}
return version, nil
Expand Down

0 comments on commit 4fd268d

Please sign in to comment.