Apache Lucene open-source search software
fix test bug: an ancient codec might fail earlier on addDocument
Robert Muir85d282a245ce
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java b/lucene/core/src/test/org/apache/lucene/index/TestCodecs.javaindex e1753f9945b..3c8f89224d5 100644--- a/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java+++ b/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java@@ -860,10 +860,10 @@ public class TestCodecs extends LuceneTestCase {Document doc = new Document();doc.add(new StringField("f", "bar", Store.YES));doc.add(new NumericDocValuesField("n", 18L));- writer.addDocument(doc);OLD_FORMAT_IMPERSONATION_IS_ACTIVE = false;try {+ writer.addDocument(doc);writer.close();fail("should not have succeeded to impersonate an old format!");} catch (UnsupportedOperationException e) {