RFR 8162521, java/net/Authenticator/B4933582.sh fails intermittently with BindException
daniel.fuchs at oracle.com
Thu Dec 1 10:58:57 UTC 2016
Good to see one more script converted to java.
I wonder if the fact that the test use to run two separate
JVMs was significant. Hopefully it's not.
The changes in TestHttpServer seem OK - this class is shared
by many other tests - so any modifications here is to be taken
with care. I trust you ran all the jdk_net tests?
maybe MyAuthenticator.count should be made volatile (or AtomicInteger).
I don't think it's strictly necessary as I believe our implementation
will only call it in the client thread (which is always the main thread
here) - but it may be a better idea to use AtomicInteger anyway: just
make no assumption :-)
I'd also suggest to use try-with-resource to close in
CacheImpl (int port) and CacheImpl::writeMap to make sure
the file is always properly closed.
On 01/12/16 09:47, Felix Yang wrote:
> please review the following patch. The code was converted from shell
> script to plain Java. Since it is by-design to bind on a prior-used
> port, add a few of re-tries for possible BindException.
More information about the core-libs-dev