On Tue, 26 Sep 2023 09:15:52 GMT, Daniel Jeliński <[email protected]> wrote:

>> Daniel Fuchs has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains six additional 
>> commits since the last revision:
>> 
>>  - Rename test, use TestTaskScope
>>  - Make the test independent of any preview API, and use regular threads
>>  - Improve the fix to make sure dependent actions are all executed
>>  - Merge branch 'master' into HttpGetWithCancelledStructuredScope-8316580
>>  - Merge branch 'master' into HttpGetWithCancelledStructuredScope-8316580
>>  - 8316580
>
> test/jdk/java/net/httpclient/HttpGetInCancelledFuture.java line 97:
> 
>> 95:     }
>> 96: 
>> 97:     static final String HOST = "localhost:62057";
> 
> Should we have something listening on that port? Some of our tests used to 
> fail after receiving an unexpected connenction, and 62057 is in the ephemeral 
> range.

Good question. I guess it doesn't matter as long as it doesn't reply with a 
valid response, but if the port is a server port used by some other test 
running on the machine that only expect a given type/number/sequence of 
requests it might make the other test fail. Let me experiment with a 
ServerSocket that doesn't answer, then we might get either TimeoutException or 
Connection Refused when the backlog is full. That should work as well to test 
the fix.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15883#discussion_r1337360026

Reply via email to