Skip to content

Commit 79932b0

Browse files
committed
skip instead of throw error on non-linux os
1 parent 51bd54a commit 79932b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/java/com/github/dockerjava/netty/exec/AttachContainerCmdExecTest.java

+6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
import java.io.PipedInputStream;
1111
import java.io.PipedOutputStream;
1212
import java.lang.reflect.Method;
13+
import java.util.Locale;
1314

1415
import org.testng.ITestResult;
16+
import org.testng.SkipException;
1517
import org.testng.annotations.AfterMethod;
1618
import org.testng.annotations.AfterTest;
1719
import org.testng.annotations.BeforeMethod;
@@ -30,6 +32,10 @@ public class AttachContainerCmdExecTest extends AbstractNettyDockerClientTest {
3032

3133
@BeforeTest
3234
public void beforeTest() throws Exception {
35+
// io.netty.channel.epollNative#loadNativeLibrary only support Linux
36+
if (!System.getProperty("os.name").toLowerCase(Locale.UK).trim().startsWith("linux")) {
37+
throw new SkipException("only support Linux");
38+
}
3339
super.beforeTest();
3440
}
3541

0 commit comments

Comments
 (0)