On Mon, 12 Sep 2022 12:52:00 GMT, Daniel Fuchs <[email protected]> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   fix test server to avoid hang in test
>
> test/jdk/java/net/HttpURLConnection/Response1xxTest.java line 225:
> 
>> 223:         final HttpURLConnection urlConnection = (HttpURLConnection) 
>> requestURI.toURL().openConnection();
>> 224:         // we expect the request to fail because the server 
>> unexpectedly sends a 101 response
>> 225:         Assert.assertThrows(IOException.class, () -> 
>> urlConnection.getResponseCode());
> 
> Should we explicitly wait for ProtocolException here, since it's what we're 
> throwing?

I initially thought about that, but since the API javadoc doesn't specifically 
talk about this sub-type of `IOException`, I decided it's perhaps better not to 
start expecting it. However, if it's OK for the test to rely on this (internal) 
knowledge then I'll go ahead and change it.

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

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

Reply via email to