testConnectCancellation() — netty Function Reference
Architecture documentation for the testConnectCancellation() function in SocketConnectionAttemptTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD faa1e098_048a_7a75_e34b_9fc3b12d01ab["testConnectCancellation()"] c0d6b551_b352_95d7_da6e_f24e2cd37df2["SocketConnectionAttemptTest"] faa1e098_048a_7a75_e34b_9fc3b12d01ab -->|defined in| c0d6b551_b352_95d7_da6e_f24e2cd37df2 c908e3c2_865b_b453_e224_f19cf9891338["isConnectCancellationSupported()"] faa1e098_048a_7a75_e34b_9fc3b12d01ab -->|calls| c908e3c2_865b_b453_e224_f19cf9891338 style faa1e098_048a_7a75_e34b_9fc3b12d01ab fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketConnectionAttemptTest.java lines 119–148
@Test
public void testConnectCancellation(TestInfo testInfo) throws Throwable {
// Check if the test can be executed or should be skipped because of no network/internet connection
// See https://github.com/netty/netty/issues/1474
boolean badHostTimedOut = true;
Socket socket = new Socket();
try {
SocketUtils.connect(socket, SocketUtils.socketAddress(BAD_HOST, BAD_PORT), 10);
} catch (ConnectException e) {
badHostTimedOut = false;
// is thrown for no route to host when using Socket connect
} catch (Exception e) {
// ignore
} finally {
try {
socket.close();
} catch (IOException e) {
// ignore
}
}
assumeTrue(badHostTimedOut, "The connection attempt to " + BAD_HOST + " does not time out.");
run(testInfo, new Runner<Bootstrap>() {
@Override
public void run(Bootstrap bootstrap) throws Throwable {
testConnectCancellation(bootstrap);
}
});
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does testConnectCancellation() do?
testConnectCancellation() is a function in the netty codebase, defined in testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketConnectionAttemptTest.java.
Where is testConnectCancellation() defined?
testConnectCancellation() is defined in testsuite/src/main/java/io/netty/testsuite/transport/socket/SocketConnectionAttemptTest.java at line 119.
What does testConnectCancellation() call?
testConnectCancellation() calls 1 function(s): isConnectCancellationSupported.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free