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

Ensure we can load the native library or fail the build #11262

Merged
merged 1 commit into from
May 18, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public class EpollKQueueIovArrayTest extends IovArrayTest {

@BeforeClass
public static void loadNative() {
Assume.assumeTrue(Epoll.isAvailable());
Epoll.ensureAvailability();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;

public class EpollSocketTest extends SocketTest<LinuxSocket> {
@BeforeClass
public static void loadJNI() {
assumeTrue(Epoll.isAvailable());
Epoll.ensureAvailability();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@
import java.net.InetAddress;
import java.net.InetSocketAddress;

import static org.junit.Assume.assumeTrue;

public class LinuxSocketTest {
@BeforeClass
public static void loadJNI() {
assumeTrue(Epoll.isAvailable());
Epoll.ensureAvailability();
}

@Test(expected = IOException.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
package io.netty.channel.kqueue;

import io.netty.channel.unix.tests.IovArrayTest;
import org.junit.Assume;
import org.junit.BeforeClass;

public class KQueueIovArrayTest extends IovArrayTest {

@BeforeClass
public static void loadNative() {
Assume.assumeTrue(KQueue.isAvailable());
KQueue.ensureAvailability();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
import java.io.IOException;

import static org.junit.Assert.*;
import static org.junit.Assume.assumeTrue;

public class KQueueSocketTest extends SocketTest<BsdSocket> {
@BeforeClass
public static void loadJNI() {
assumeTrue(KQueue.isAvailable());
KQueue.ensureAvailability();
}

@Test
Expand Down