mirror of https://github.com/apache/lucene.git
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:
parent
8f7f8d432d
commit
f9d5643c01
lucene/core/src/test/org/apache/lucene/index
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue