Skip to content

Commit de9539a

Browse files
author
Renato Costa
committed
roachtest: use longer upgrade timeout in backup-restore/mixed-version
Informs: cockroachdb#107414 Release note: None
1 parent 8620ff4 commit de9539a

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

pkg/cmd/roachtest/roachtestutil/clusterupgrade/clusterupgrade.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ func WaitForClusterUpgrade(
286286
return nil
287287
}
288288

289-
l.Printf("waiting for cluster to auto-upgrade to %s", newVersion)
289+
l.Printf("waiting for cluster to auto-upgrade to %s for %s", newVersion, timeout)
290290
if err := waitForUpgrade(firstNode, timeout); err != nil {
291291
return err
292292
}

pkg/cmd/roachtest/roachtestutil/mixedversion/planner.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ func (p *testPlanner) initSteps() []testStep {
145145
// nodes to be the same and then run any after-finalization hooks the
146146
// user may have provided.
147147
func (p *testPlanner) finalSteps() []testStep {
148-
fmt.Printf(">>>> option timeout: %s\n", p.options.upgradeTimeout)
149148
return append([]testStep{
150149
waitForStableClusterVersionStep{id: p.nextID(), nodes: p.crdbNodes, timeout: p.options.upgradeTimeout},
151150
}, p.hooks.AfterUpgradeFinalizedSteps(p.nextID, p.finalContext(false /* finalizing */))...)

pkg/cmd/roachtest/roachtestutil/mixedversion/planner_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,16 +264,15 @@ func Test_startClusterID(t *testing.T) {
264264
// timeout in the clusterupgrade package is used; otherwise, the
265265
// custom value is enforced.
266266
func Test_upgradeTimeout(t *testing.T) {
267-
findUpgradeWaitStep := func(plan *TestPlan) []waitForStableClusterVersionStep {
268-
var zero waitForStableClusterVersionStep
267+
findUpgradeWaitSteps := func(plan *TestPlan) []waitForStableClusterVersionStep {
269268
var steps []waitForStableClusterVersionStep
270269
for _, s := range plan.steps {
271270
if step, isUpgrade := s.(waitForStableClusterVersionStep); isUpgrade {
272271
steps = append(steps, step)
273272
}
274273
}
275274
if len(steps) == 0 {
276-
require.Fail(t, "could not find any %T step in the plan", zero)
275+
require.Fail(t, "could not find any waitForStableClusterVersionStep in the plan")
277276
}
278277
return steps
279278
}
@@ -282,7 +281,7 @@ func Test_upgradeTimeout(t *testing.T) {
282281
mvt := newTest(opts...)
283282
plan, err := mvt.plan()
284283
require.NoError(t, err)
285-
waitUpgrades := findUpgradeWaitStep(plan)
284+
waitUpgrades := findUpgradeWaitSteps(plan)
286285

287286
for _, s := range waitUpgrades {
288287
require.Equal(t, expectedTimeout, s.timeout)

pkg/cmd/roachtest/tests/mixed_version_backup.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,14 @@ func registerBackupMixedVersion(r registry.Registry) {
21012101

21022102
roachNodes := c.Range(1, c.Spec().NodeCount-1)
21032103
workloadNode := c.Node(c.Spec().NodeCount)
2104-
mvt := mixedversion.NewTest(ctx, t, t.L(), c, roachNodes)
2104+
mvt := mixedversion.NewTest(
2105+
ctx, t, t.L(), c, roachNodes,
2106+
// We use a longer upgrade timeout in this test to give the
2107+
// migrations enough time to finish considering all the data
2108+
// that might exist in the cluster by the time the upgrade is
2109+
// attempted.
2110+
mixedversion.UpgradeTimeout(30*time.Minute),
2111+
)
21052112
testRNG := mvt.RNG()
21062113

21072114
uploadVersion(ctx, t, c, workloadNode, clusterupgrade.MainVersion)

0 commit comments

Comments
 (0)