LUCENE-2598: wire this test to ramdirectory

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@988688 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2010-08-24 19:43:57 +00:00
parent 142f7926c7
commit 912563e594
1 changed files with 4 additions and 2 deletions

View File

@ -25,6 +25,7 @@ import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.MockDirectoryWrapper;
import org.apache.lucene.store.RAMDirectory;
import org.apache.lucene.util.English;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.lucene.util._TestUtil;
@ -195,8 +196,9 @@ public class TestTransactions extends LuceneTestCase {
public void testTransactions() throws Throwable {
RANDOM = newRandom();
MockDirectoryWrapper dir1 = newDirectory(RANDOM);
MockDirectoryWrapper dir2 = newDirectory(RANDOM);
// we cant use non-ramdir on windows, because this test needs to double-write.
MockDirectoryWrapper dir1 = new MockDirectoryWrapper(new RAMDirectory());
MockDirectoryWrapper dir2 = new MockDirectoryWrapper(new RAMDirectory());
dir1.setPreventDoubleWrite(false);
dir2.setPreventDoubleWrite(false);
dir1.failOn(new RandomFailure());