[TEST] Add test that ensures we never bump the minor version of lucene in a bugfix release

This commit is contained in:
Simon Willnauer 2016-03-15 14:15:41 +01:00
parent 2390eb5ed4
commit 52c283cdee
1 changed files with 16 additions and 0 deletions

View File

@ -260,4 +260,20 @@ public class VersionTests extends ESTestCase {
}
}
// this test ensures we never bump the lucene version in a bugfix release
public void testLuceneVersionIsSameOnMinorRelease() {
for (Version version : VersionUtils.allVersions()) {
for (Version other : VersionUtils.allVersions()) {
if (other.onOrAfter(version)) {
assertTrue("lucene versions must be " + other + " >= " + version,
other.luceneVersion.onOrAfter(version.luceneVersion));
}
if (other.major == version.major && other.minor == version.minor) {
assertEquals(other.luceneVersion.major, version.luceneVersion.major);
assertEquals(other.luceneVersion.minor, version.luceneVersion.minor);
// should we also assert the lucene bugfix version?
}
}
}
}
}