add commented out assert that finds more bugs

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1428565 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2013-01-03 20:02:01 +00:00
parent 8f7f8d432d
commit f9d5643c01
1 changed files with 6 additions and 7 deletions
lucene/core/src/test/org/apache/lucene/index

View File

@ -1045,16 +1045,15 @@ public class TestIndexWriter extends LuceneTestCase {
}
if (random.nextInt(3) == 0) {
IndexReader r = null;
boolean success = false;
try {
r = DirectoryReader.open(w, random.nextBoolean());
success = true;
// TODO: more bugs!
// if (random.nextBoolean() && r.maxDoc() > 0) {
// int docid = random.nextInt(r.maxDoc());
// w.tryDeleteDocument(r, docid);
//}
} finally {
if (success) {
r.close();
} else {
IOUtils.closeWhileHandlingException(r);
}
IOUtils.closeWhileHandlingException(r);
}
}
if (i%10 == 0) {