File tree 1 file changed +0
-18
lines changed
src/test/java/com/upserve/uppend/blobs
1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import com .upserve .uppend .util .SafeDeleting ;
4
4
import org .junit .*;
5
- import org .junit .runner .RunWith ;
6
- import org .mockito .Mock ;
7
- import org .mockito .junit .MockitoJUnitRunner ;
8
5
9
6
import java .io .IOException ;
10
7
import java .nio .MappedByteBuffer ;
11
8
import java .nio .channels .FileChannel ;
12
9
import java .nio .file .*;
13
10
14
- import static org .mockito .Mockito .when ;
15
-
16
- @ RunWith (MockitoJUnitRunner .class )
17
11
public class NativeIOTest {
18
12
19
13
String fname = "test_file" ;
@@ -34,21 +28,9 @@ public void tearDown() throws IOException {
34
28
SafeDeleting .removeDirectory (rootPath );
35
29
}
36
30
37
- @ Mock
38
- MappedByteBuffer mockBuffer ;
39
-
40
31
@ Test
41
32
public void test_madvise () throws IOException {
42
33
MappedByteBuffer buffer = fc .map (FileChannel .MapMode .READ_WRITE , 57 , 5329 );
43
34
NativeIO .madvise (buffer , NativeIO .Advice .Sequential );
44
35
}
45
-
46
- @ Test
47
- public void test_madvise_raise () throws IOException {
48
- when (mockBuffer .isDirect ()).thenReturn (true );
49
- //when(mockBuffer.capacity()).thenReturn(-100);
50
- NativeIO .madvise (mockBuffer , NativeIO .Advice .Random );
51
- }
52
-
53
-
54
36
}
You can’t perform that action at this time.
0 commit comments