NissimShiman commented on code in PR #6414:
URL: https://github.com/apache/nifi/pull/6414#discussion_r990403225
##########
nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/map/TestDistributedMapServerAndClient.java:
##########
@@ -298,6 +301,45 @@ public void testLimitServiceReadSize() throws
InitializationException, IOExcepti
}
}
+ @Test
+ public void testIncompleteHandshakeScenario() throws
InitializationException, IOException {
+ // Default port used by Distributed Server and Client
+ final int port = 4557;
+
+ // This is used to simulate a DistributedCacheServer that does not
complete the handshake response
+ final ServerSocketChannel serverSocketChannel =
ServerSocketChannel.open();
+ serverSocketChannel.configureBlocking(true);
+ serverSocketChannel.bind(new InetSocketAddress(port));
+ final Thread thread = startServerSocket(serverSocketChannel);
Review Comment:
Very nice. I wasn't aware of this netty-based socket work before. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]