kenhuuu commented on code in PR #1833:
URL: https://github.com/apache/tinkerpop/pull/1833#discussion_r1037707370
##########
gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/WebSocketClientBehaviorIntegrateTest.java:
##########
@@ -271,4 +276,28 @@ public void
shouldNotCreateReplacementConnectionWhenClientClosesConnection() thr
.filter(str -> str.contains("Considering new
connection on"))
.count());
}
-}
\ No newline at end of file
+
+ /**
+ * (TINKERPOP-2814) Tests to make sure that the SSL handshake is now
capped by connectionSetupTimeoutMillis and not
+ * the default Netty SSL handshake timeout of 10,000ms.
+ */
+ @Test
+ public void
shouldAttemptHandshakeForLongerThanDefaultNettySslHandshakeTimeout() {
+ final Cluster cluster =
Cluster.build("localhost").port(SimpleSocketServer.PORT)
+ .minConnectionPoolSize(1)
+ .maxConnectionPoolSize(1)
+ .connectionSetupTimeoutMillis(20000) // needs to be larger
than 10,000ms.
+ .enableSsl(true)
+ .create();
+
+ final Client.ClusteredClient client = cluster.connect();
+ final long start = System.currentTimeMillis();
+
+ try {
+ client.submit("1");
+ } finally {
+ // Test against 15,000ms which should give a big enough buffer to
avoid timing issues.
+ assertTrue(System.currentTimeMillis() - start > 15000);
Review Comment:
Yes, your understanding of the test is correct. Sure, I'll add those
assertions.
--
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]