RFR: 8293696: java/nio/channels/DatagramChannel/SelectWhenRefused.java fails with "Unexpected wakeup" [v2]

Daniel Fuchs dfuchs at openjdk.org
Thu Oct 27 18:26:33 UTC 2022


On Thu, 27 Oct 2022 18:03:50 GMT, Mark Sheppard <msheppar at openjdk.org> wrote:

>> Darragh Clarke has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   added loop to retry in event of interruption from other tests
>
> test/jdk/java/nio/channels/DatagramChannel/SelectWhenRefused.java line 65:
> 
>> 63:                     ignoreStrayWakeup = checkUnexpectedWakeup(dc, sel.selectedKeys());
>> 64:                     sel.selectedKeys().clear();
>> 65:                     if (ignoreStrayWakeup) {
> 
> scenario 1 and 3 treat the received message differently to that of scenario 2 -- should they be handled the same ?

I don't think so - scenario 2 is the one that expect the PortUnreachableException - so the wakeup is expected there and the read is expected to throw PortUnreadableException. The other two scenario are expected to timeout of the select with n == 0;

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

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


More information about the nio-dev mailing list