RFR: 8310996: Add JFR event for connect operations [v8]
Tim Prinzing
tprinzing at openjdk.org
Mon Dec 16 20:24:20 UTC 2024
On Thu, 12 Dec 2024 09:48:45 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision:
>>
>> requests fixes
>>
>> - Use IOException.toString() instead of getMessage() in case it's empty
>> - Attempts to test connect exceptions may fail due to unexpected
>> successful connect. Tests quit with uncompleted status if the
>> connect is successful and are retried a small number of times until
>> the test can be performed properly. If the retries are exceeded an
>> exception is generated indicating the test can't be setup properly.
>
> test/jdk/jdk/jfr/event/io/TestSocketAdapterEvents.java line 154:
>
>> 152: s.connect(addr);
>> 153: // unexpected, abandon the test
>> 154: return false;
>
> The main issue with using the ephemeral port range is that you might manage to connect to a server opened by another test, and that might cause the other test to fail if it's not expecting connections to get closed.
>
> If instead you use ports in the IANA reserved port range - at least you know that you won't connect to other tests running on the same machine.
>
> Have you tried to connect to port 225 for instance, and increase the port number up to 241 in case you still manage to connect?
>
> Ports 225-241 are reserved by IANA - so there should be nobody listening there. I had some trouble on windows 2016 with port 47, but hopefully ports 225-241 will not have the same issue.
I've changed the exception tests to use the port range you suggested.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21528#discussion_r1887538817
More information about the hotspot-jfr-dev
mailing list