Skip to content

Commit de24bc0

Browse files
committed
Add test with io_uring
1 parent 5bdd701 commit de24bc0

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,14 @@
226226
<scope>test</scope>
227227
</dependency>
228228

229+
<dependency>
230+
<groupId>io.netty</groupId>
231+
<artifactId>netty-transport-native-io_uring</artifactId>
232+
<version>${netty.version}</version>
233+
<classifier>linux-x86_64</classifier>
234+
<scope>test</scope>
235+
</dependency>
236+
229237
<dependency>
230238
<groupId>io.netty</groupId>
231239
<artifactId>netty-tcnative-boringssl-static</artifactId>

src/test/java/com/rabbitmq/stream/impl/StreamEnvironmentTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
import io.netty.channel.epoll.EpollSocketChannel;
5959
import io.netty.channel.kqueue.KQueueIoHandler;
6060
import io.netty.channel.kqueue.KQueueSocketChannel;
61+
import io.netty.channel.uring.IoUringIoHandler;
62+
import io.netty.channel.uring.IoUringSocketChannel;
6163
import io.netty.handler.ssl.SslHandler;
6264
import java.net.ConnectException;
6365
import java.nio.charset.StandardCharsets;
@@ -749,6 +751,13 @@ void nativeEpollWorksOnLinux() {
749751
nativeIo(EpollIoHandler.newFactory(), EpollSocketChannel.class);
750752
}
751753

754+
@Test
755+
@EnabledOnOs(OS.LINUX)
756+
@EnabledIfSystemProperty(named = "os.arch", matches = "amd64")
757+
void nativeIoUringWorksOnLinux() {
758+
nativeIo(IoUringIoHandler.newFactory(), IoUringSocketChannel.class);
759+
}
760+
752761
@Test
753762
@EnabledOnOs(OS.MAC)
754763
@EnabledIfSystemProperty(named = "os.arch", matches = "aarch64")

0 commit comments

Comments
 (0)