Fix more tests to not use concurrent flushing in RIW#commit()

This commit is contained in:
Simon Willnauer 2019-03-15 22:18:02 +01:00
parent 1a54c6b19d
commit af5c2b22da
1 changed files with 7 additions and 7 deletions

View File

@ -368,7 +368,7 @@ public class TestIDVersionPostingsFormat extends LuceneTestCase {
duplicate.add(makeIDField("id", 17));
expectThrows(IllegalArgumentException.class, () -> {
w.addDocument(duplicate);
w.commit();
w.commit(false);
});
w.close();
@ -465,7 +465,7 @@ public class TestIDVersionPostingsFormat extends LuceneTestCase {
doc.add(newTextField("id", "id", Field.Store.NO));
expectThrows(IllegalArgumentException.class, () -> {
w.addDocument(doc);
w.commit();
w.commit(false);
});
w.close();
@ -498,7 +498,7 @@ public class TestIDVersionPostingsFormat extends LuceneTestCase {
doc.add(new StringAndPayloadField("id", "id", new BytesRef("foo")));
expectThrows(IllegalArgumentException.class, () -> {
w.addDocument(doc);
w.commit();
w.commit(false);
});
w.close();
@ -543,7 +543,7 @@ public class TestIDVersionPostingsFormat extends LuceneTestCase {
doc.add(new Field("id", ts, ft));
expectThrows(IllegalArgumentException.class, () -> {
w.addDocument(doc);
w.commit();
w.commit(false);
fail("didn't hit expected exception");
});
@ -561,7 +561,7 @@ public class TestIDVersionPostingsFormat extends LuceneTestCase {
doc.add(makeIDField("id", 17));
expectThrows(IllegalArgumentException.class, () -> {
w.addDocument(doc);
w.commit();
w.commit(false);
});
w.close();
@ -578,7 +578,7 @@ public class TestIDVersionPostingsFormat extends LuceneTestCase {
doc.add(new StringAndPayloadField("id", "id", new BytesRef(new byte[] {(byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff})));
expectThrows(IllegalArgumentException.class, () -> {
w.addDocument(doc);
w.commit();
w.commit(false);
});
expectThrows(AlreadyClosedException.class, () -> {
w.addDocument(doc);
@ -596,7 +596,7 @@ public class TestIDVersionPostingsFormat extends LuceneTestCase {
doc.add(new StringAndPayloadField("id", "id", new BytesRef(new byte[] {(byte)0x7f, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff})));
expectThrows(IllegalArgumentException.class, () -> {
w.addDocument(doc);
w.commit();
w.commit(false);
});
expectThrows(AlreadyClosedException.class, () -> {
w.addDocument(doc);