RFR: 8290083: ResponseBodyBeforeError: javax.net.ssl.SSLException: Unsupported or unrecognized SSL message

Jaikiran Pai jpai at openjdk.org
Tue Jul 12 07:46:43 UTC 2022


On Mon, 11 Jul 2022 14:35:55 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

> Please find enclosed a simple test fix.
> This test has been observed failing once with an SSLException. My suspicion is that some random process (other test or ...) has tried to connect to the test ReplyingServer and sent some plain text that failed the handshake.
> 
> The fix hardens the server to close the connection and proceed to accept the next one, for a limited number of times...

test/jdk/java/net/httpclient/ResponseBodyBeforeError.java line 349:

> 347:         @Override
> 348:         public void run() {
> 349:             int maxUnexpected = 2;

Hello Daniel, should we have this `maxUnexpected` at all? Perhaps, we keep accepting and ignoring connections/requests that don't match our expectations? The reason I ask this is, I don't think we will know the exact number of unexpected requests/connections that this server might receive when this test is going on, so with this value of 2, I guess there still would be a chance that this test fails because of those unexpected connections?

-------------

PR: https://git.openjdk.org/jdk/pull/9454


More information about the net-dev mailing list