RFR: 8223716: sun/net/www/http/HttpClient/MultiThreadTest.java should be more resilient to unexpected traffic

Daniel Fuchs daniel.fuchs at oracle.com
Mon May 13 18:29:59 UTC 2019


Hi,

Please find below a fix for:

[1] 8223716: sun/net/www/http/HttpClient/MultiThreadTest.java should be
          more resilient to unexpected traffic


Occasionally a test server may receive traffic that doesn't originate
from the client in the test. If the client makes requests that are
recognizable as originating from the client, the server can
sometimes (depending on the test logic) safely ignore what doesn't
appear to be coming from the expected client.

This change proposes to do so for the MultiThreadTest server,
which sometimes receives more connections than it expects:

http://cr.openjdk.java.net/~dfuchs/webrev_8223716/webrev.00/

However - after having eliminated this possible failure cause,
I have now convinced myself that the additional connection
observed from time to time may indeed be coming from the rightful
client. For the sake of test stabilization, this changes propose
to slightly relax the test logic to allow for one additional
connection than what the test expects.

A followup bug [2] has been logged to investigate the why
a sixth connection is sometime created by the client.

best regards,

-- daniel

[1] https://bugs.openjdk.java.net/browse/JDK-8223716
[2] https://bugs.openjdk.java.net/browse/JDK-8223783



More information about the net-dev mailing list