From 460170b69c8481db0e525196f22db00c3748e7f8 Mon Sep 17 00:00:00 2001 From: Jon Marius Venstad Date: Wed, 26 Sep 2018 15:07:13 +0200 Subject: Revert "Balder/add native fadvise" --- .../test/java/com/yahoo/io/NativeIOTestCase.java | 34 ---------------------- 1 file changed, 34 deletions(-) delete mode 100644 vespajlib/src/test/java/com/yahoo/io/NativeIOTestCase.java (limited to 'vespajlib/src/test/java/com/yahoo/io/NativeIOTestCase.java') 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(); - } -} -- cgit v1.2.3