mirror of https://github.com/apache/lucene.git
fix test bug: an ancient codec might fail earlier on addDocument
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1619410 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e681856c55
commit
85d282a245
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue