add a test for term docs version deletes

This commit is contained in:
kimchy 2011-01-27 00:00:29 +02:00
parent 30f54fe23e
commit ead4d600be
1 changed files with 5 additions and 0 deletions

View File

@ -62,5 +62,10 @@ public class UidFieldTests {
reader = writer.getReader();
assertThat(UidField.loadVersion(reader, new Term("_uid", "1")), equalTo(2l));
assertThat(UidField.loadDocIdAndVersion(reader, new Term("_uid", "1")).version, equalTo(2l));
writer.deleteDocuments(new Term("_uid", "1"));
reader = writer.getReader();
assertThat(UidField.loadVersion(reader, new Term("_uid", "1")), equalTo(-1l));
assertThat(UidField.loadDocIdAndVersion(reader, new Term("_uid", "1")).version, equalTo(-1l));
}
}