testEpollWaitTimeoutAccuracy() — netty Function Reference
Architecture documentation for the testEpollWaitTimeoutAccuracy() function in EpollTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 0115e6dc_73c5_5904_5844_498b25ab8495["testEpollWaitTimeoutAccuracy()"] d19acad4_cac4_5960_b5c8_a3e77d808f28["EpollTest"] 0115e6dc_73c5_5904_5844_498b25ab8495 -->|defined in| d19acad4_cac4_5960_b5c8_a3e77d808f28 style 0115e6dc_73c5_5904_5844_498b25ab8495 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollTest.java lines 37–58
@Test
@Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
public void testEpollWaitTimeoutAccuracy() throws Exception {
final int timeoutMs = 200;
final FileDescriptor epoll = Native.newEpollCreate();
final EpollEventArray eventArray = new EpollEventArray(8);
try {
long startNs = System.nanoTime();
// No fds registered, so this will just wait for the timeout.
int ready = Native.epollWait(epoll, eventArray, timeoutMs);
long elapsedMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNs);
assertEquals(0, ready);
// Should have waited at least close to the timeout
assertThat(elapsedMs).isGreaterThanOrEqualTo(timeoutMs - 20);
// Should not have waited vastly longer than the timeout
assertThat(elapsedMs).isLessThan(timeoutMs + 200);
} finally {
eventArray.free();
epoll.close();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testEpollWaitTimeoutAccuracy() do?
testEpollWaitTimeoutAccuracy() is a function in the netty codebase, defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollTest.java.
Where is testEpollWaitTimeoutAccuracy() defined?
testEpollWaitTimeoutAccuracy() is defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/EpollTest.java at line 37.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free