summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/test/java/com/yahoo/io/NativeIOTestCase.java
diff options
context:
space:
mode:
authorJon Marius Venstad <jonmv@users.noreply.github.com>2018-09-26 15:07:13 +0200
committerGitHub <noreply@github.com>2018-09-26 15:07:13 +0200
commit460170b69c8481db0e525196f22db00c3748e7f8 (patch)
tree43e1d273c7ec549747c9ea806d1d55c719c99876 /vespajlib/src/test/java/com/yahoo/io/NativeIOTestCase.java
parent597ca76803b8c83594c7214184b02ec974488319 (diff)
Revert "Balder/add native fadvise"
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo/io/NativeIOTestCase.java')
-rw-r--r--vespajlib/src/test/java/com/yahoo/io/NativeIOTestCase.java34
1 files changed, 0 insertions, 34 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/io/NativeIOTestCase.java b/vespajlib/src/test/java/com/yahoo/io/NativeIOTestCase.java
deleted file mode 100644
index ecd38056a19..00000000000
--- a/vespajlib/src/test/java/com/yahoo/io/NativeIOTestCase.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.yahoo.io;
-
-import com.sun.jna.Platform;
-import org.junit.Test;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
-
-public class NativeIOTestCase {
-
- @Test
- public void requireThatDropFileFromCacheDoesNotThrow() throws IOException {
- File testFile = new File("testfile");
- FileOutputStream output = new FileOutputStream(testFile);
- output.write('t');
- output.flush();
- output.close();
- NativeIO nativeIO = new NativeIO();
- if (Platform.isLinux()) {
- assertTrue(nativeIO.valid());
- } else {
- assertFalse(nativeIO.valid());
- assertEquals("Platform is unsúpported. Only supported on linux.", nativeIO.getError().getMessage());
- }
- nativeIO.dropFileFromCache(output.getFD());
- nativeIO.dropFileFromCache(testFile);
- testFile.delete();
- }
-}