dweiss commented on code in PR #13095: URL: https://github.com/apache/lucene/pull/13095#discussion_r1488345592
########## lucene/backward-codecs/src/test/org/apache/lucene/backward_index/BackwardsCompatibilityTestBase.java: ########## @@ -48,25 +52,28 @@ public abstract class BackwardsCompatibilityTestBase extends LuceneTestCase { - protected final Version version; + static final Set<String> OLD_VERSIONS; + protected static final Set<Version> BINARY_SUPPORTED_VERSIONS; + private static final Version LATEST_PREVIOUS_MAJOR = getLatestPreviousMajorVersion(); + + protected final Version version; protected final String indexPattern; - protected static final Set<Version> BINARY_SUPPORTED_VERSIONS; static { - String[] oldVersions = - new String[] { - "8.0.0", "8.0.0", "8.1.0", "8.1.0", "8.1.1", "8.1.1", "8.2.0", "8.2.0", "8.3.0", "8.3.0", - "8.3.1", "8.3.1", "8.4.0", "8.4.0", "8.4.1", "8.4.1", "8.5.0", "8.5.0", "8.5.1", "8.5.1", - "8.5.2", "8.5.2", "8.6.0", "8.6.0", "8.6.1", "8.6.1", "8.6.2", "8.6.2", "8.6.3", "8.6.3", - "8.7.0", "8.7.0", "8.8.0", "8.8.0", "8.8.1", "8.8.1", "8.8.2", "8.8.2", "8.9.0", "8.9.0", - "8.10.0", "8.10.0", "8.10.1", "8.10.1", "8.11.0", "8.11.0", "8.11.1", "8.11.1", "8.11.2", - "8.11.2", "8.11.3", "8.11.3", "8.12.0", "9.0.0", "9.1.0", "9.2.0", "9.3.0", "9.4.0", - "9.4.1", "9.4.2", "9.5.0", "9.6.0", "9.7.0", "9.8.0", "9.9.0", "9.9.1", "9.9.2" - }; - + String name = "versions.txt"; + try (LineNumberReader in = + new LineNumberReader( + IOUtils.getDecodingReader( + IOUtils.requireResourceNonNull( + TestAncientIndicesCompatibility.class.getResourceAsStream(name), name), + StandardCharsets.UTF_8))) { + OLD_VERSIONS = in.lines().collect(Collectors.toCollection(LinkedHashSet::new)); Review Comment: I see Simon already applied that (thank you!). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org