RFR: 8332535: Mark java/nio/channels/DatagramChannel/Loopback.java as intermittent [v5]

SendaoYan syan at openjdk.org
Wed Jun 26 15:46:32 UTC 2024


On Wed, 26 Jun 2024 15:08:42 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   add Thread.sleep(3000) in while loop
>
> test/jdk/java/nio/channels/DatagramChannel/Loopback.java line 168:
> 
>> 166:                             // We're not supposed to receive stray datagrams here,
>> 167:                             // so respin with 3 full seconds as this shouldn't happen too often
>> 168:                             Thread.sleep(3000);
> 
> Sorry for being unclear - please remove that Thread.sleep().
> 
> What I meant is that the `continue` statement below will lead us to calling `sel.select(3000);` again at line 155, and since we're not expecting to receive any datagram, it will block for 3 seconds again. 
> 
> Anyway - that's what the test was doing already if receiving a datagram from a socket where `senderPort != localPort` - so that's probably OK to leave it like that.
> 
> Please revert the last change - what you had before was good.

Sorry for the misunderstand, Thread.sleep and InterruptedException has been deleted.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19314#discussion_r1655118184


More information about the nio-dev mailing list