don't use MockDirectoryWrapper here: it can cause testThreadSafety thread starvation so test times out after 2 hours

This commit is contained in:
Mike McCandless 2016-06-13 04:42:11 -04:00
parent fce10ae109
commit b9ded92295
1 changed files with 6 additions and 1 deletions

View File

@ -30,7 +30,12 @@ public class TestHardLinkCopyDirectoryWrapper extends BaseDirectoryTestCase {
@Override
protected Directory getDirectory(Path file) throws IOException {
Directory open = random().nextBoolean() ? newFSDirectory(file) : newDirectory();
Directory open;
if (random().nextBoolean()) {
open = new RAMDirectory();
} else {
open = FSDirectory.open(file);
}
return new HardlinkCopyDirectoryWrapper(open);
}