RFR [13] 8170705: sun/net/www/protocol/http/StackTraceTest.java fails intermittently with Invalid Http response
Chris Hegarty
chris.hegarty at oracle.com
Sun Mar 17 08:53:30 UTC 2019
This review is for a test only change. It resolves a rare intermittent
failure.
The issue is that the test creates, retrieves the local port, and
immediately closes a server socket. It then expects this port to refuse
subsequent connections. This is an anti-pattern, since on a busy machine
the port may be reused ( and subsequently accept future connections ),
before this test attempts to connect.
The solution is to use the test library `Utils::refusingEndpoint` to
retrieve a local address that will refuse connections.
http://cr.openjdk.java.net/~chegar/8170705/
-Chris.
More information about the net-dev
mailing list