Skip to content

Commit

Permalink
roachtest: add ctx timeout in multitenant-upgrade
Browse files Browse the repository at this point in the history
This would have turned the timeout in cockroachdb#72420 into a faster failure.

Release note: None
  • Loading branch information
tbg committed Nov 4, 2021
1 parent 4493953 commit 1545843
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 1545843

Please sign in to comment.