RFR [14] 8231504: Update networking tests to avoid implicit dependency on the system proxy

Chris Hegarty chris.hegarty at oracle.com
Thu Sep 26 13:04:17 UTC 2019


A number of tests in the networking area invoke the no-args
URL::openConnection. If support for system proxies is enabled, the
default on macOS, then the built-in http(s) and ftp protocol handlers
may attempt to make a connection to a proxy. In almost all cases, this
is the wrong thing for the test to do. Typically, the test is
exercising something in the protocol handler implementation, rather than
proxy support ( there are other tests that exercise proxy support ).
This is an accidental dependency.

In many cases the connection to the system configured proxy may be
benign, but not always, it depends. Such accidental dependencies should
be remove, since they serve little purpose and could negatively affect
test stability.

Webrev:
  http://cr.openjdk.java.net/~chegar/8231504/webrev.00/

This change may not address all such scenarios in the tests, but it does
address a large number of them ( as observed when running on my local
system with a promiscuous proxy configured ). We've done similar efforts
in the past.

-Chris.


More information about the net-dev mailing list