benwtrent commented on code in PR #12912: URL: https://github.com/apache/lucene/pull/12912#discussion_r1422433156
########## lucene/backward-codecs/src/test/org/apache/lucene/backward_index/TestBackwardsCompatibility.java: ########## @@ -2265,4 +2268,47 @@ public void testReadNMinusTwoSegmentInfos() throws IOException { } } } + + public static final String[] oldWikiTermsNames = {"wikiterms.9.8.0.zip"}; + + public void testCreateWikiTermsIndex() throws Exception { + Path indexDir = getIndexDir().resolve("wikiterms"); + Files.deleteIfExists(indexDir); + Directory dir = newFSDirectory(indexDir); + + IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig()); + BytesRefIterator termsEnum = TermsTestUtil.load(TermsTestUtil.WIKI_40000_TERMS_FILE); + BytesRef term; + while ((term = termsEnum.next()) != null) { + Document document = new Document(); + document.add(new StringField("body", term, Field.Store.NO)); + writer.addDocument(document); + } + + writer.flush(); + writer.commit(); + writer.forceMerge(1); + writer.close(); + dir.close(); + + // Gives you time to copy the index out!: (there is also + // a test option to not remove temp dir...): + Thread.sleep(100000); Review Comment: I thought `-Ptests.bwcdir=` made this sleep hack unnecessary? Seems like we shouldn't have any of these data generative tests using `Thread.sleep`. -- 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