RFR: 8334405: java/nio/channels/Selector/SelectWithConsumer.java#id0 failed in testWakeupDuringSelect [v3]

Vyom Tewari vtewari at openjdk.org
Thu Aug 1 11:40:39 UTC 2024


On Wed, 31 Jul 2024 18:45:02 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Replace differences of milliseconds vs. epoch to differences of nanoseconds per the JVM's high-resolution time source.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8334405: Update limits on expected duration as suggested

Looks OK to me.

test/jdk/java/nio/channels/Selector/SelectWithConsumer.java line 766:

> 764:     private static long millisTime() {
> 765:         long now = System.nanoTime();
> 766:         return TimeUnit.MILLISECONDS.convert(now, TimeUnit.NANOSECONDS);

you can get rid of local variable now as follows.
return TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS);

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

Marked as reviewed by vtewari (Committer).

PR Review: https://git.openjdk.org/jdk/pull/20398#pullrequestreview-2212486249
PR Review Comment: https://git.openjdk.org/jdk/pull/20398#discussion_r1699996130


More information about the nio-dev mailing list