Skip to content
Permalink
Browse files
Troubleshooting why the travis-ci build fails, but does not fail
locally.
  • Loading branch information
leerho committed Nov 8, 2018
1 parent 5120ebc commit 19d156dcd38016402bb9665966a6d7772b677394
Showing 2 changed files with 3 additions and 1 deletion.
@@ -227,7 +227,7 @@ private static long map(final FileChannel fileChannel, final boolean resourceRea
}
}

private static boolean isFileReadOnly(final File file) {
static boolean isFileReadOnly(final File file) {
if (System.getProperty("os.name").startsWith("Windows")) {
return !file.canWrite();
}
@@ -5,6 +5,7 @@

package com.yahoo.memory;

import static com.yahoo.memory.AllocateDirectMap.isFileReadOnly;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
@@ -114,6 +115,7 @@ public void testMapException() throws IOException {
public void simpleMap2() throws IOException {
File file =
new File(getClass().getClassLoader().getResource("GettysburgAddress.txt").getFile());
assertTrue(isFileReadOnly(file));
try (WritableMapHandle rh = WritableMemory.map(file)) {
//
}

0 comments on commit 19d156d

Please sign in to comment.