mirror of https://github.com/apache/lucene.git
LUCENE-2598: use the specified -Dtests.directory when tests copy from an existing one too
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@988259 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4e737ef56e
commit
707617ee02
|
@ -343,7 +343,11 @@ public abstract class LuceneTestCase extends TestCase {
|
|||
|
||||
public MockDirectoryWrapper newDirectory(Random r, Directory d) throws IOException {
|
||||
StackTraceElement[] stack = new Exception().getStackTrace();
|
||||
MockDirectoryWrapper dir = new MockDirectoryWrapper(new RAMDirectory(d));
|
||||
Directory impl = LuceneTestCaseJ4.newDirectoryImpl(TEST_DIRECTORY);
|
||||
for (String file : d.listAll()) {
|
||||
d.copy(impl, file, file);
|
||||
}
|
||||
MockDirectoryWrapper dir = new MockDirectoryWrapper(impl);
|
||||
stores.put(dir, stack);
|
||||
return dir;
|
||||
}
|
||||
|
|
|
@ -596,7 +596,11 @@ public class LuceneTestCaseJ4 {
|
|||
|
||||
public static MockDirectoryWrapper newDirectory(Random r, Directory d) throws IOException {
|
||||
StackTraceElement[] stack = new Exception().getStackTrace();
|
||||
MockDirectoryWrapper dir = new MockDirectoryWrapper(new RAMDirectory(d));
|
||||
Directory impl = newDirectoryImpl(TEST_DIRECTORY);
|
||||
for (String file : d.listAll()) {
|
||||
d.copy(impl, file, file);
|
||||
}
|
||||
MockDirectoryWrapper dir = new MockDirectoryWrapper(impl);
|
||||
stores.put(dir, stack);
|
||||
return dir;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue