use of org.junit.jupiter.api.condition.EnabledOnOs in project cryptomator by cryptomator.
the class VaultModuleTest method testLinuxFuseDefaultMountFlags.
@Test
@DisplayName("provideDefaultMountFlags on Linux/FUSE")
@EnabledOnOs(OS.LINUX)
public void testLinuxFuseDefaultMountFlags() {
Mockito.when(settings.preferredVolumeImpl()).thenReturn(new SimpleObjectProperty<>(VolumeImpl.FUSE));
StringBinding result = module.provideDefaultMountFlags(settings, vaultSettings);
MatcherAssert.assertThat(result.get(), CoreMatchers.containsString("-oro"));
}
use of org.junit.jupiter.api.condition.EnabledOnOs in project neo4j by neo4j.
the class DefaultFileSystemAbstractionTest method retrieveWindowsFileDescriptor.
@Test
@EnabledOnOs(OS.WINDOWS)
void retrieveWindowsFileDescriptor() throws IOException {
Path testFile = testDirectory.file("testFile");
try (StoreChannel storeChannel = fsa.write(testFile)) {
int fileDescriptor = fsa.getFileDescriptor(storeChannel);
assertThat(fileDescriptor).isEqualTo(INVALID_FILE_DESCRIPTOR);
}
}
use of org.junit.jupiter.api.condition.EnabledOnOs in project neo4j by neo4j.
the class PageSwapperTest method doNotAllowDirectIOForPagesNotMultipleOfBlockSize.
@Test
@EnabledOnOs(OS.LINUX)
void doNotAllowDirectIOForPagesNotMultipleOfBlockSize() throws IOException {
PageSwapperFactory factory = createSwapperFactory(getFs());
Path file = file("file");
checkUnsupportedPageSize(factory, file, 17);
checkUnsupportedPageSize(factory, file, 115);
checkUnsupportedPageSize(factory, file, 218);
checkUnsupportedPageSize(factory, file, 419);
checkUnsupportedPageSize(factory, file, 524);
checkUnsupportedPageSize(factory, file, 1023);
checkUnsupportedPageSize(factory, file, 4097);
}
use of org.junit.jupiter.api.condition.EnabledOnOs in project neo4j by neo4j.
the class VersionAwareLogEntryReaderIT method readOnlyLogFilesWhileCommandsAreAvailable.
@Test
@EnabledOnOs(OS.LINUX)
void readOnlyLogFilesWhileCommandsAreAvailable() throws IOException {
LogFiles logFiles = LogFilesBuilder.builder(databaseLayout, fs).withLogEntryReader(entryReader).withLogVersionRepository(new SimpleLogVersionRepository()).withTransactionIdStore(new SimpleTransactionIdStore()).withStoreId(StoreId.UNKNOWN).build();
try (Lifespan lifespan = new Lifespan(logFiles)) {
assertEquals(kibiBytes(128), Files.size(logFiles.getLogFile().getHighestLogFile()));
LogPosition logPosition = entryReader.lastPosition();
assertEquals(0L, logPosition.getLogVersion());
// this position in a log file before 0's are actually starting
assertEquals(END_OF_DATA_OFFSET, logPosition.getByteOffset());
}
}
use of org.junit.jupiter.api.condition.EnabledOnOs in project netty by netty.
the class NativeLibraryLoaderTest method testMultipleResourcesWithSameContentInTheClassLoader.
@Test
@EnabledOnOs(LINUX)
@EnabledIf("is_x86_64")
void testMultipleResourcesWithSameContentInTheClassLoader() throws MalformedURLException {
URL url1 = new File("src/test/data/NativeLibraryLoader/1").toURI().toURL();
URL url2 = new File("src/test/data/NativeLibraryLoader/2").toURI().toURL();
final URLClassLoader loader = new URLClassLoader(new URL[] { url1, url2 });
final String resourceName = "test3";
NativeLibraryLoader.load(resourceName, loader);
assertTrue(true);
}
Aggregations