testConnectAndStreamPriority() — netty Function Reference
Architecture documentation for the testConnectAndStreamPriority() function in QuicChannelConnectTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 7daa9afd_3b73_a1f1_a189_7a0c8aa22a29["testConnectAndStreamPriority()"] 1e1bc485_1969_4537_ef9b_f28971b2f663["QuicChannelConnectTest"] 7daa9afd_3b73_a1f1_a189_7a0c8aa22a29 -->|defined in| 1e1bc485_1969_4537_ef9b_f28971b2f663 50ae9935_9ff5_26ef_46de_b1c885717ce2["BytesCountingHandler()"] 7daa9afd_3b73_a1f1_a189_7a0c8aa22a29 -->|calls| 50ae9935_9ff5_26ef_46de_b1c885717ce2 5f0fc68a_3438_a865_1307_d0a3144b2c00["assertState()"] 7daa9afd_3b73_a1f1_a189_7a0c8aa22a29 -->|calls| 5f0fc68a_3438_a865_1307_d0a3144b2c00 style 7daa9afd_3b73_a1f1_a189_7a0c8aa22a29 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelConnectTest.java lines 993–1038
@ParameterizedTest
@MethodSource("newSslTaskExecutors")
public void testConnectAndStreamPriority(Executor executor) throws Throwable {
int numBytes = 8;
ChannelActiveVerifyHandler serverQuicChannelHandler = new ChannelActiveVerifyHandler();
CountDownLatch serverLatch = new CountDownLatch(1);
CountDownLatch clientLatch = new CountDownLatch(1);
Channel server = QuicTestUtils.newServer(executor, serverQuicChannelHandler,
new BytesCountingHandler(serverLatch, numBytes));
InetSocketAddress address = (InetSocketAddress) server.localAddress();
Channel channel = QuicTestUtils.newClient(executor);
try {
ChannelActiveVerifyHandler clientQuicChannelHandler = new ChannelActiveVerifyHandler();
QuicChannel quicChannel = QuicTestUtils.newQuicChannelBootstrap(channel)
.handler(clientQuicChannelHandler)
.streamHandler(new ChannelInboundHandlerAdapter())
.remoteAddress(address)
.connect()
.get();
QuicStreamChannel stream = quicChannel.createStream(QuicStreamType.BIDIRECTIONAL,
new BytesCountingHandler(clientLatch, numBytes)).get();
assertNull(stream.priority());
QuicStreamPriority priority = new QuicStreamPriority(0, false);
stream.updatePriority(priority).sync();
assertEquals(priority, stream.priority());
stream.writeAndFlush(Unpooled.directBuffer().writeZero(numBytes)).sync();
clientLatch.await();
stream.close().sync();
quicChannel.close().sync();
ChannelFuture closeFuture = quicChannel.closeFuture().await();
assertTrue(closeFuture.isSuccess());
clientQuicChannelHandler.assertState();
} finally {
serverLatch.await();
serverQuicChannelHandler.assertState();
server.close().sync();
// Close the parent Datagram channel as well.
channel.close().sync();
shutdown(executor);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testConnectAndStreamPriority() do?
testConnectAndStreamPriority() is a function in the netty codebase, defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelConnectTest.java.
Where is testConnectAndStreamPriority() defined?
testConnectAndStreamPriority() is defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelConnectTest.java at line 993.
What does testConnectAndStreamPriority() call?
testConnectAndStreamPriority() calls 2 function(s): BytesCountingHandler, assertState.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free