Handle "current" being dropped from the list of released versions
Original commit: elastic/x-pack-elasticsearch@46668ce672b440c9aac7806a2acf32ed842922c8
@@ -100,12 +100,11 @@ public abstract class AbstractOldXPackIndicesBackwardsCompatibilityTestCase exte
public void testAllVersionsTested() throws Exception {
SortedSet<String> expectedVersions = new TreeSet<>();
for (Version v : VersionUtils.allReleasedVersions()) {
- if (false == shouldTestVersion(v)) continue;
- if (v.before(Version.CURRENT.minimumIndexCompatibilityVersion())) continue; // we can only support one major version backward
- if (v.equals(Version.CURRENT)) continue; // the current version is always compatible with itself
- if (v.isBeta() == true || v.isAlpha() == true || v.isRC() == true) continue; // don't check alphas etc
+ if (v.isRelease()) {
+ // no guarantees for prereleases
expectedVersions.add("x-pack-" + v.toString() + ".zip");
}
+ }
expectedVersions.removeAll(dataFiles);
if (expectedVersions.isEmpty() == false) {
StringBuilder msg = new StringBuilder("Old index tests are missing indexes:");
@@ -121,7 +120,6 @@ public abstract class AbstractOldXPackIndicesBackwardsCompatibilityTestCase exte
Collections.shuffle(dataFiles, random());
for (String dataFile : dataFiles) {
Version version = Version.fromString(dataFile.replace("x-pack-", "").replace(".zip", ""));
- if (false == shouldTestVersion(version)) continue;
long clusterStartTime = System.nanoTime();
setupCluster(dataFile);
ensureYellow();
@@ -137,13 +135,6 @@ public abstract class AbstractOldXPackIndicesBackwardsCompatibilityTestCase exte
}
}
- /**
- * Should we test this version at all? Called before loading the data directory. Return false to skip it entirely.
- */
- protected boolean shouldTestVersion(Version version) {
- return true;
- }
-
/**
* Actually test this version.
*/
