|
|
@ -9,6 +9,7 @@ import org.junit.Test; |
|
|
|
import org.junit.rules.TemporaryFolder; |
|
|
|
import org.junit.rules.TemporaryFolder; |
|
|
|
import org.rocksdb.util.Environment; |
|
|
|
import org.rocksdb.util.Environment; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.nio.file.*; |
|
|
|
import java.nio.file.*; |
|
|
|
|
|
|
|
|
|
|
@ -28,4 +29,13 @@ public class NativeLibraryLoaderTest { |
|
|
|
assertThat(Files.exists(path)).isTrue(); |
|
|
|
assertThat(Files.exists(path)).isTrue(); |
|
|
|
assertThat(Files.isReadable(path)).isTrue(); |
|
|
|
assertThat(Files.isReadable(path)).isTrue(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void overridesExistingLibrary() throws IOException { |
|
|
|
|
|
|
|
File first = NativeLibraryLoader.getInstance().loadLibraryFromJarToTemp( |
|
|
|
|
|
|
|
temporaryFolder.getRoot().getAbsolutePath()); |
|
|
|
|
|
|
|
NativeLibraryLoader.getInstance().loadLibraryFromJarToTemp( |
|
|
|
|
|
|
|
temporaryFolder.getRoot().getAbsolutePath()); |
|
|
|
|
|
|
|
assertThat(first.exists()).isTrue(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|