From 1545843aab60b1ac5b634faa6b0996ab262ce8fd Mon Sep 17 00:00:00 2001 From: Tobias Grieger Date: Thu, 4 Nov 2021 10:43:27 +0100 Subject: [PATCH] roachtest: add ctx timeout in multitenant-upgrade This would have turned the timeout in #72420 into a faster failure. Release note: None --- pkg/cmd/roachtest/tests/multitenant_upgrade.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/cmd/roachtest/tests/multitenant_upgrade.go b/pkg/cmd/roachtest/tests/multitenant_upgrade.go index 98eb9f2a8bec..b6adfe6e56b6 100644 --- a/pkg/cmd/roachtest/tests/multitenant_upgrade.go +++ b/pkg/cmd/roachtest/tests/multitenant_upgrade.go @@ -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 {