RFR: 8254350: CompletableFuture.get may swallow InterruptedException [v2]

Martin Buchholz martinrb at google.com
Tue Dec 8 20:54:30 UTC 2020


On Tue, Dec 8, 2020 at 3:54 AM Daniel Fuchs <dfuchs at openjdk.java.net> wrote:

>
> > RandomFactory is probably overkill here as the test just needs to
> exercise untimed and timed get. So just a random boolean rather than a wide
> range of random values.
>
> OK.
>

There's a conflict between the desires to do more thorough testing and
avoid flaky intermittent failures.

Especially in j.u.concurrent we embrace test non-determinism, much of it
comes from the concurrency we're testing, and retrieving a random seed for
reproducibility is not worth the effort.

No one does a good job of race prevention through testing.


More information about the core-libs-dev mailing list