Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Make ConnectTimeout test accept NoRouteToHostException #1526
That is an entirely reasonable exception to throw in this case, but not the intent of the test.
I think the test is intended to time out while connecting to the unreachable address. But it relies on highly platform-dependent behaviour. In particular if there's any sort of negative caching in place the test may fast-fail:
rendering the test useless for the intended purpose.
I propose to treat this as a skipped test, per the associated pull request.
(I've also included a trivial fix for a normally-unreachable NPE I hit during testing here).
@@ Coverage Diff @@ ## master #1526 +/- ## ============================================ + Coverage 68.84% 68.84% +<.01% Complexity 3943 3943 ============================================ Files 179 179 Lines 16478 16480 +2 Branches 2675 2676 +1 ============================================ + Hits 11344 11346 +2 + Misses 3888 3887 -1 - Partials 1246 1247 +1