EpollSocketChannelTest Class — netty Architecture
Architecture documentation for the EpollSocketChannelTest class in EpollSocketChannelTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d65ca846_317f_ea83_eb06_5feb9f9a7735["EpollSocketChannelTest"] 7f15457f_04d8_e9f8_fd3a_4fdc2257e8fc["EpollSocketChannelTest.java"] d65ca846_317f_ea83_eb06_5feb9f9a7735 -->|defined in| 7f15457f_04d8_e9f8_fd3a_4fdc2257e8fc 7dc79d46_2d9b_9f9c_ae80_88fcc89c4553["testTcpInfo()"] d65ca846_317f_ea83_eb06_5feb9f9a7735 -->|method| 7dc79d46_2d9b_9f9c_ae80_88fcc89c4553 bad70b4f_2ea3_48a3_627b_e42298abf8c8["testTcpInfoReuse()"] d65ca846_317f_ea83_eb06_5feb9f9a7735 -->|method| bad70b4f_2ea3_48a3_627b_e42298abf8c8 9ceed904_dae4_3c99_a2a8_92a7fc7ad164["assertTcpInfo0()"] d65ca846_317f_ea83_eb06_5feb9f9a7735 -->|method| 9ceed904_dae4_3c99_a2a8_92a7fc7ad164 f591ee50_ee17_e70f_3e24_21f24a96fd4e["testSoLingerNoAssertError()"] d65ca846_317f_ea83_eb06_5feb9f9a7735 -->|method| f591ee50_ee17_e70f_3e24_21f24a96fd4e
Relationship Graph
Source Code
transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollSocketChannelTest.java lines 31–124
public class EpollSocketChannelTest {
@Test
public void testTcpInfo() throws Exception {
EventLoopGroup group = new MultiThreadIoEventLoopGroup(1, EpollIoHandler.newFactory());
try {
Bootstrap bootstrap = new Bootstrap();
EpollSocketChannel ch = (EpollSocketChannel) bootstrap.group(group)
.channel(EpollSocketChannel.class)
.handler(new ChannelInboundHandlerAdapter())
.bind(new InetSocketAddress(0)).syncUninterruptibly().channel();
EpollTcpInfo info = ch.tcpInfo();
assertTcpInfo0(info);
ch.close().syncUninterruptibly();
} finally {
group.shutdownGracefully();
}
}
@Test
public void testTcpInfoReuse() throws Exception {
EventLoopGroup group = new MultiThreadIoEventLoopGroup(1, EpollIoHandler.newFactory());
try {
Bootstrap bootstrap = new Bootstrap();
EpollSocketChannel ch = (EpollSocketChannel) bootstrap.group(group)
.channel(EpollSocketChannel.class)
.handler(new ChannelInboundHandlerAdapter())
.bind(new InetSocketAddress(0)).syncUninterruptibly().channel();
EpollTcpInfo info = new EpollTcpInfo();
ch.tcpInfo(info);
assertTcpInfo0(info);
ch.close().syncUninterruptibly();
} finally {
group.shutdownGracefully();
}
}
private static void assertTcpInfo0(EpollTcpInfo info) throws Exception {
assertNotNull(info);
assertTrue(info.state() >= 0);
assertTrue(info.caState() >= 0);
assertTrue(info.retransmits() >= 0);
assertTrue(info.probes() >= 0);
assertTrue(info.backoff() >= 0);
assertTrue(info.options() >= 0);
assertTrue(info.sndWscale() >= 0);
assertTrue(info.rcvWscale() >= 0);
assertTrue(info.rto() >= 0);
assertTrue(info.ato() >= 0);
assertTrue(info.sndMss() >= 0);
assertTrue(info.rcvMss() >= 0);
assertTrue(info.unacked() >= 0);
assertTrue(info.sacked() >= 0);
assertTrue(info.lost() >= 0);
assertTrue(info.retrans() >= 0);
assertTrue(info.fackets() >= 0);
assertTrue(info.lastDataSent() >= 0);
assertTrue(info.lastAckSent() >= 0);
assertTrue(info.lastDataRecv() >= 0);
assertTrue(info.lastAckRecv() >= 0);
assertTrue(info.pmtu() >= 0);
assertTrue(info.rcvSsthresh() >= 0);
assertTrue(info.rtt() >= 0);
assertTrue(info.rttvar() >= 0);
assertTrue(info.sndSsthresh() >= 0);
assertTrue(info.sndCwnd() >= 0);
assertTrue(info.advmss() >= 0);
assertTrue(info.reordering() >= 0);
assertTrue(info.rcvRtt() >= 0);
assertTrue(info.rcvSpace() >= 0);
assertTrue(info.totalRetrans() >= 0);
}
// See https://github.com/netty/netty/issues/7159
@Test
public void testSoLingerNoAssertError() throws Exception {
EventLoopGroup group = new MultiThreadIoEventLoopGroup(1, EpollIoHandler.newFactory());
Source
Frequently Asked Questions
What is the EpollSocketChannelTest class?
EpollSocketChannelTest is a class in the netty codebase, defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollSocketChannelTest.java.
Where is EpollSocketChannelTest defined?
EpollSocketChannelTest is defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollSocketChannelTest.java at line 31.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free