Skip to content

Commit 36dc40c

Browse files
committed
upgradeccl: ensure multiple releases for TestTenantUpgradeFailure test
TestTenantUpgradeFailure can only run when we support more than one previous release. This PR ensures that we setup multple releases for this test. This unblocks the PR needed to mint release-25.3: #150211 (comment) Epic: None Release note: None Release justification: test-only fix.
1 parent 54118cd commit 36dc40c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pkg/ccl/kvccl/kvtenantccl/upgradeccl/tenant_upgrade_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,20 +346,21 @@ func TestTenantUpgradeFailure(t *testing.T) {
346346

347347
v0 := clusterversion.MinSupported.Version()
348348
v2 := clusterversion.Latest.Version()
349-
// v1 needs to be between v0 and v2. Set it to the minor release
350-
// after v0 and before v2.
349+
// v1 needs to be between v0 and v2. Set it to the first version with a
350+
// different major/minor from v0.
351351
var v1 roachpb.Version
352352
for _, version := range clusterversion.ListBetween(v0, v2) {
353-
if version.Minor != v0.Minor {
353+
if version.Major != v0.Major && version.Minor != v0.Minor {
354354
v1 = version
355355
break
356356
}
357357
}
358-
if v1 == (roachpb.Version{}) {
358+
if v1 == (roachpb.Version{}) || v1 == v2 {
359359
// There is no in-between version supported; skip this test.
360360
skip.IgnoreLint(t, "test can only run when we support two previous releases")
361361
}
362362

363+
t.Logf("v0=%s v1=%s v2=%s", v0, v1, v2)
363364
t.Log("starting server")
364365
ctx := context.Background()
365366
settings := cluster.MakeTestingClusterSettingsWithVersions(

0 commit comments

Comments
 (0)