LUCENE-9777: Fix out of date versions on releases 8.7.0 and 8.8.0 (#2377)

This commit is contained in:
Ignacio Vera 2021-02-17 08:29:05 +01:00 committed by GitHub
parent 902cb93db2
commit cfd0ccefe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 26 additions and 6 deletions

View File

@ -53,7 +53,7 @@ def create_and_add_index(source, indextype, index_version, current_version, temp
print(' creating %s...' % filename, end='', flush=True)
module = 'backward-codecs'
index_dir = os.path.join('lucene', module, 'src/test/org/apache/lucene/index')
index_dir = os.path.join('lucene', module, 'src/test/org/apache/lucene/backward_index')
test_file = os.path.join(index_dir, filename)
if os.path.exists(os.path.join(index_dir, filename)):
print('uptodate')
@ -98,13 +98,13 @@ def create_and_add_index(source, indextype, index_version, current_version, temp
def update_backcompat_tests(types, index_version, current_version):
print(' adding new indexes %s to backcompat tests...' % types, end='', flush=True)
module = 'lucene/backward-codecs'
filename = '%s/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java' % module
filename = '%s/src/test/org/apache/lucene/backward_index/TestBackwardsCompatibility.java' % module
if not current_version.is_back_compat_with(index_version):
matcher = re.compile(r'final String\[\] unsupportedNames = {|};')
elif 'sorted' in types:
matcher = re.compile(r'final static String\[\] oldSortedNames = {|};')
matcher = re.compile(r'static final String\[\] oldSortedNames = {|};')
else:
matcher = re.compile(r'final static String\[\] oldNames = {|};')
matcher = re.compile(r'static final String\[\] oldNames = {|};')
strip_dash_suffix_re = re.compile(r'-.*')

View File

@ -361,7 +361,11 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
"8.6.2-cfs",
"8.6.2-nocfs",
"8.6.3-cfs",
"8.6.3-nocfs"
"8.6.3-nocfs",
"8.7.0-cfs",
"8.7.0-nocfs",
"8.8.0-cfs",
"8.8.0-nocfs"
};
public static String[] getOldNames() {
@ -383,7 +387,9 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
"sorted.8.6.0",
"sorted.8.6.1",
"sorted.8.6.2",
"sorted.8.6.3"
"sorted.8.6.3",
"sorted.8.7.0",
"sorted.8.8.0"
};
public static String[] getOldSortedNames() {

View File

@ -133,6 +133,20 @@ public final class Version {
*/
@Deprecated public static final Version LUCENE_8_6_3 = new Version(8, 6, 3);
/**
* Match settings and bugs in Lucene's 8.7.0 release.
*
* @deprecated Use latest
*/
@Deprecated public static final Version LUCENE_8_7_0 = new Version(8, 7, 0);
/**
* Match settings and bugs in Lucene's 8.8.0 release.
*
* @deprecated Use latest
*/
@Deprecated public static final Version LUCENE_8_8_0 = new Version(8, 8, 0);
/**
* Match settings and bugs in Lucene's 9.0.0 release.
*