reduce timing sensitivity in SocketConnectorBaseTest
testConnectionFails was expecting the connector thread to exit after being interrupted, with latency no greater than the configured delay between connection attempts. However, the call to SocketFactory.createSocket may not return immediately on interrupt. Now, we allow 4 * DELAY for the thread to exit. This commit should allow more than enough tolerance, but (as it generally has no effect on the run duration of the test) we could increase the allowed delay even further if it proves too sensitive to timing variations on the build system.
parent
513e3800
Please register or sign in to comment