Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
72426: roachtest: add ctx timeout in multitenant-upgrade r=[erikgrinaker,stevendanna] a=tbg

This would have turned the timeout in cockroachdb#72420 into a faster failure.

Release note: None


Co-authored-by: Tobias Grieger <[email protected]>
  • Loading branch information
craig[bot] and tbg committed Nov 4, 2021
2 parents a058a02 + 1545843 commit f84b8e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cmd/roachtest/tests/multitenant_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ func (tn *tenantNode) start(ctx context.Context, t test.Test, c cluster.Cluster,
return err
}
defer db.Close()
ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second)
defer cancel()
_, err = db.ExecContext(ctx, `SELECT 1`)
return err
}); err != nil {
Expand Down

0 comments on commit f84b8e7

Please sign in to comment.