Skip to content

Commit

Permalink
fix Netty dependencies (#1935)
Browse files Browse the repository at this point in the history
  • Loading branch information
sullis authored Feb 23, 2024
1 parent 34523db commit c780a86
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
23 changes: 23 additions & 0 deletions client/src/test/java/org/asynchttpclient/netty/NettyTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package org.asynchttpclient.netty;

import io.netty.channel.epoll.Epoll;
import io.netty.channel.kqueue.KQueue;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;

import static org.junit.jupiter.api.Assertions.assertTrue;

public class NettyTest {
@Test
@EnabledOnOs(value = OS.LINUX)
public void epollIsAvailableOnLinux() {
assertTrue(Epoll.isAvailable());
}

@Test
@EnabledOnOs(value = OS.MAC)
public void kqueueIsAvailableOnMac() {
assertTrue(KQueue.isAvailable());
}
}
16 changes: 16 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@
<optional>true</optional>
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<classifier>linux-aarch_64</classifier>
<version>${netty.version}</version>
<optional>true</optional>
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
Expand All @@ -186,6 +194,14 @@
<optional>true</optional>
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<classifier>osx-aarch_64</classifier>
<version>${netty.version}</version>
<optional>true</optional>
</dependency>

<dependency>
<groupId>io.netty.incubator</groupId>
<artifactId>netty-incubator-transport-native-io_uring</artifactId>
Expand Down

0 comments on commit c780a86

Please sign in to comment.