testUseConfiguredEventLoop() — netty Function Reference
Architecture documentation for the testUseConfiguredEventLoop() function in DnsAddressResolverGroupTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 17ad9576_75c4_5cdb_b86b_aa07026d7c42["testUseConfiguredEventLoop()"] 7de44a2b_93e5_48a5_c515_7968f4e2b9e0["DnsAddressResolverGroupTest"] 17ad9576_75c4_5cdb_b86b_aa07026d7c42 -->|defined in| 7de44a2b_93e5_48a5_c515_7968f4e2b9e0 style 17ad9576_75c4_5cdb_b86b_aa07026d7c42 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
resolver-dns/src/test/java/io/netty/resolver/dns/DnsAddressResolverGroupTest.java lines 42–71
@Test
public void testUseConfiguredEventLoop() throws InterruptedException {
EventLoopGroup group = new MultiThreadIoEventLoopGroup(1, NioIoHandler.newFactory());
final EventLoop loop = group.next();
EventLoopGroup defaultEventLoopGroup = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
DnsNameResolverBuilder builder = new DnsNameResolverBuilder()
.eventLoop(loop).datagramChannelType(NioDatagramChannel.class);
DnsAddressResolverGroup resolverGroup = new DnsAddressResolverGroup(builder);
try {
final Promise<?> promise = loop.newPromise();
AddressResolver<?> resolver = resolverGroup.getResolver(defaultEventLoopGroup.next());
resolver.resolve(new SocketAddress() {
private static final long serialVersionUID = 3169703458729818468L;
}).addListener((FutureListener<Object>) future -> {
try {
assertInstanceOf(UnsupportedAddressTypeException.class, future.cause());
assertTrue(loop.inEventLoop());
promise.setSuccess(null);
} catch (Throwable cause) {
promise.setFailure(cause);
}
}).await();
promise.sync();
} finally {
resolverGroup.close();
group.shutdownGracefully();
defaultEventLoopGroup.shutdownGracefully();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testUseConfiguredEventLoop() do?
testUseConfiguredEventLoop() is a function in the netty codebase, defined in resolver-dns/src/test/java/io/netty/resolver/dns/DnsAddressResolverGroupTest.java.
Where is testUseConfiguredEventLoop() defined?
testUseConfiguredEventLoop() is defined in resolver-dns/src/test/java/io/netty/resolver/dns/DnsAddressResolverGroupTest.java at line 42.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free