Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip BinLogTest on OSX for Java 9 and newer due to fcntl(fd, F_FULLSYNC) being slow. #152

Merged
merged 1 commit into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/binlog/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ description = 'jPOS-EE :: BinLog Module'

dependencies {
api libraries.jpos
testImplementation libraries.commons_lang
}

9 changes: 8 additions & 1 deletion modules/binlog/src/test/java/org/jpos/binlog/BinLogTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import java.io.IOException;
import java.util.concurrent.atomic.AtomicLong;

import static org.apache.commons.lang3.JavaVersion.JAVA_9;
import static org.apache.commons.lang3.SystemUtils.*;
import static org.junit.jupiter.api.Assertions.assertEquals;


Expand All @@ -44,7 +46,12 @@ public class BinLogTest implements Runnable {

@BeforeEach
public void before () {
Assumptions.assumeFalse(System.getProperty("os.name").startsWith("Windows")); //Skip Tests for BinLog if on MS Windows
/**
* Skip Tests for BinLog if on MS Windows due to file locking considerations
* Skip Binlog Tests for OSX on Java 9 and newer due to fcntl(fd, F_FULLSYNC) being slow
* Note: Java 8 does not properly flush buffers to disk on OSX
*/
Assumptions.assumeFalse(IS_OS_WINDOWS || (IS_OS_MAC_OSX && isJavaVersionAtLeast(JAVA_9)));
}

@BeforeAll
Expand Down