mirror of https://github.com/apache/lucene.git
prevent mockDirectory from failing during rollback
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/realtime_search@1092329 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cf52aa04c2
commit
db1270e5f7
|
@ -537,7 +537,9 @@ public class TestIndexWriterDelete extends LuceneTestCase {
|
|||
}
|
||||
}
|
||||
final double randomIOExceptionRate = dir.getRandomIOExceptionRate();
|
||||
final long maxSizeInBytes = dir.getMaxSizeInBytes();
|
||||
dir.setRandomIOExceptionRate(0.0);
|
||||
dir.setMaxSizeInBytes(0);
|
||||
if (!success) {
|
||||
// Must force the close else the writer can have
|
||||
// open files which cause exc in MockRAMDir.close
|
||||
|
@ -552,7 +554,7 @@ public class TestIndexWriterDelete extends LuceneTestCase {
|
|||
TestIndexWriter.assertNoUnreferencedFiles(dir, "after writer.close");
|
||||
}
|
||||
dir.setRandomIOExceptionRate(randomIOExceptionRate);
|
||||
|
||||
dir.setMaxSizeInBytes(maxSizeInBytes);
|
||||
|
||||
// Finally, verify index is not corrupt, and, if
|
||||
// we succeeded, we see all docs changed, and if
|
||||
|
|
Loading…
Reference in New Issue