Search in sources :

Example 1 with NativeAccess

use of org.neo4j.internal.nativeimpl.NativeAccess in project neo4j by neo4j.

the class LogFileChannelNativeAccessorTest method setUp.

@BeforeEach
void setUp() throws IOException {
    var filesContext = mock(TransactionLogFilesContext.class);
    nativeAccess = mock(NativeAccess.class, RETURNS_MOCKS);
    when(filesContext.getNativeAccess()).thenReturn(nativeAccess);
    when(filesContext.getLogProvider()).thenReturn(logProvider);
    when(filesContext.getRotationThreshold()).thenReturn(new AtomicLong(5));
    channelNativeAccessor = new LogFileChannelNativeAccessor(fileSystem, filesContext);
    Path originalFile = testDirectory.file("test");
    testStoreChannel = fileSystem.write(originalFile);
}
Also used : Path(java.nio.file.Path) AtomicLong(java.util.concurrent.atomic.AtomicLong) NativeAccess(org.neo4j.internal.nativeimpl.NativeAccess) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

Path (java.nio.file.Path)1 AtomicLong (java.util.concurrent.atomic.AtomicLong)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 NativeAccess (org.neo4j.internal.nativeimpl.NativeAccess)1