Tests: Skip Version.CURRENT for static bwc indexes
The current version is normally a snapshot while in development. However, when the release process changes the snapshot flag to false, this causes the static bwc tests to fail because they cannot find an index for the current version. Instead, this change skips the current version, because there is no need to test a verion's bwc against itself. closes #10292 closes #10293
This commit is contained in:
parent
3f8908acfb
commit
96fa466414
|
@ -86,8 +86,9 @@ public class OldIndexBackwardsCompatibilityTests extends StaticIndexBackwardComp
|
|||
for (java.lang.reflect.Field field : Version.class.getDeclaredFields()) {
|
||||
if (Modifier.isStatic(field.getModifiers()) && field.getType() == Version.class) {
|
||||
Version v = (Version)field.get(Version.class);
|
||||
if (v.snapshot()) continue;
|
||||
if (v.onOrBefore(Version.V_0_20_6)) continue;
|
||||
if (v.snapshot()) continue; // snapshots are unreleased, so there is no backcompat yet
|
||||
if (v.onOrBefore(Version.V_0_20_6)) continue; // we can only test back one major lucene version
|
||||
if (v.equals(Version.CURRENT)) continue; // the current version is always compatible with itself
|
||||
|
||||
expectedVersions.add("index-" + v.toString() + ".zip");
|
||||
}
|
||||
|
|
|
@ -72,6 +72,7 @@ public class RestoreBackwardsCompatTests extends AbstractSnapshotTests {
|
|||
Version v = (Version) field.get(Version.class);
|
||||
if (v.snapshot()) continue;
|
||||
if (v.onOrBefore(Version.V_1_0_0_Beta1)) continue;
|
||||
if (v.equals(Version.CURRENT)) continue;
|
||||
|
||||
expectedVersions.add(v.toString());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue