Skip to content

Commit 4ac6f7f

Browse files
committed
Check unreleased versions too
1 parent 4c0ee9a commit 4ac6f7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/test/java/org/elasticsearch/cluster/metadata/MetaDataIndexUpgradeServiceTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ public static IndexMetaData newIndexMeta(String name, Settings indexSettings) {
178178
}
179179

180180
private static Version randomEarlierCompatibleVersion() {
181-
return VersionUtils.randomVersionBetween(random(),
182-
Version.CURRENT.minimumIndexCompatibilityVersion(), VersionUtils.getPreviousVersion());
181+
return randomValueOtherThan(Version.CURRENT, () -> VersionUtils.randomVersionBetween(random(),
182+
Version.CURRENT.minimumIndexCompatibilityVersion(), Version.CURRENT));
183183
}
184184

185185
}

0 commit comments

Comments
 (0)