Disable file locking on Windows, work on #229

This commit is contained in:
Per Minborg
2020-09-02 19:24:19 +02:00
parent 36f03b4e4a
commit 07a9ba94ca
2 changed files with 72 additions and 39 deletions
@@ -1,8 +1,10 @@
package net.openhft.chronicle.map;
import net.openhft.chronicle.core.OS;
import net.openhft.chronicle.hash.ChronicleFileLockException;
import net.openhft.chronicle.hash.impl.util.CanonicalRandomAccessFiles;
import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
@@ -23,6 +25,9 @@ public class FileLockUtilTest {
@Before
public void setUp() throws IOException {
// Do not run these test on Windows
Assume.assumeFalse(OS.isWindows());
canonicalFile = new File("file.lock").getCanonicalFile();
canonicalFile.delete();
canonicalFile.createNewFile();