cshannon commented on code in PR #1360: URL: https://github.com/apache/activemq/pull/1360#discussion_r1875923956
########## activemq-unit-tests/src/test/java/org/apache/activemq/ActiveMQSslConnectionFactoryTest.java: ########## @@ -72,6 +81,34 @@ public void testCreateTcpConnectionUsingKnownPort() throws Exception { brokerStop(); } + public void testCreateTcpConnectionWithSocketParameters() throws Exception { + // Control case: check that the factory can create an ordinary (non-ssl) connection. + String tcpUri = "tcp://localhost:61610?socket.OOBInline=true&socket.keepAlive=true&tcpNoDelay=true"; + broker = createBroker(tcpUri); + + // This should create the connection. + ActiveMQSslConnectionFactory cf = getFactory(tcpUri); + connection = (ActiveMQConnection)cf.createConnection(); + assertNotNull(connection); + + Transport transport = connection.getTransport(); Review Comment: All of this code to get the socket is copied and pasted twice in both tests so you should move it into a helper method so it can be re-used. It might even come in handy as a utility for use in other tests as well but for now just making it a helper method for this test is ok just so it's not duplicated. -- 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: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact