From 032c6e12c36b87c83a5c793b77e1e1d4fd3a7bfa Mon Sep 17 00:00:00 2001 From: Chengxiong Ruan Date: Wed, 12 Jul 2023 17:21:17 -0700 Subject: [PATCH] sql: stablize TestValidateMixedVersionElements test Informs: #106612 Release note: None --- pkg/sql/schemachanger/sctest/cumulative.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/sql/schemachanger/sctest/cumulative.go b/pkg/sql/schemachanger/sctest/cumulative.go index 7ddfbbd18fc3..e6c25740d337 100644 --- a/pkg/sql/schemachanger/sctest/cumulative.go +++ b/pkg/sql/schemachanger/sctest/cumulative.go @@ -1709,6 +1709,10 @@ func ValidateMixedVersionElements(t *testing.T, path string, newCluster NewMixed }, }, true /*down level*/) tdb := sqlutils.MakeSQLRunner(db) + // Use shorter liveness heartbeat interval and longer liveness ttl to + // avoid errors caused by refused connections. + tdb.Exec(t, `SET CLUSTER SETTING server.sqlliveness.heartbeat = '1s'`) + tdb.Exec(t, `SET CLUSTER SETTING server.sqlliveness.ttl = '120s'`) // Wait for the schema changer job to hit desired stage, pause the job, // perform a cluster upgrade, and resume the job.