RFR 8011799: CompletableFuture/Basic.java fails intermittently (original) (raw)

Martin Buchholz martinrb at google.com
Sun Apr 14 14:55:55 UTC 2013


Looks good.

I've made the same mistake testing CompletableFuture.

On Sun, Apr 14, 2013 at 2:32 AM, Chris Hegarty <chris.hegarty at oracle.com>wrote:

Silly mistake in the test. Incorrectly assumes that one of the given CompletableFutures must be completed before applyToEitherXXX / acceptEitherXXX / runAfterEitherXXX / anyOf returns. The correct assertion is that one of the given CompletableFutures must be completed before the return CompletableFuture completes.

With the given structure of the test this can be done by checking that one of the given CompletableFutures is complete after joining the returned CompletableFuture. http://cr.openjdk.java.net/~chegar/8011799/webrev.00/ webrev/test/java/util/concurrent/CompletableFuture/ Basic.java.udiff.html<http://cr.openjdk.java.net/~chegar/8011799/webrev.00/webrev/test/java/util/concurrent/CompletableFuture/Basic.java.udiff.html> -Chris.



More information about the core-libs-dev mailing list