8201474: (so) Socket adaptor connect(InetAddress, timeout) succeeds when connection fails
Alan Bateman
Alan.Bateman at oracle.com
Fri Apr 13 15:49:03 UTC 2018
On 13/04/2018 16:17, Brian Burkhalter wrote:
>
> I think this looks OK. However in the test, testConnect() has a
> ‘shouldFail’ parameter which is always passed ‘true’. Should this be
> remove or cases set to ‘false’ added?
>
I've tried it keep the test consistent with the other tests. The first
test connects to a DayTimeServer, both with and without a timeout, so
that code is being exercised. The new test connect to a RefusingServer,
both with and without a timeout, as that was the case missing from the
original tests. We could drop the `shouldFail` parameter but that makes
it less useful if expanded. We could add a "false" case but that would
mean connecting to a DayTimeServer or EchoServer and it already does
this. So I'm inclined to leave it as in.
-Alan
More information about the nio-dev
mailing list