8012237: CompletableFuture/Basic.java still fails intermittently
Chris Hegarty
chris.hegarty at oracle.com
Mon Apr 15 17:41:35 UTC 2013
On 15/04/2013 18:32, Martin Buchholz wrote:
> Thanks. This looks good.
>
> I might additionally:
> - rename "phaser" to something more evocative, like "cf3Done"
> - add a checkCompletedXXX for the tardy future after the phaser arrives
> - check that cf3 result does not change when tardy future completes.
Thanks Martin, I'll make these changes before the pushing.
-Chris.
>
>
> On Mon, Apr 15, 2013 at 10:03 AM, Chris Hegarty
> <chris.hegarty at oracle.com <mailto:chris.hegarty at oracle.com>> wrote:
>
> On 15/04/2013 17:32, Martin Buchholz wrote:
>
> This looks good, in that it fixes the flakiness.
>
>
> Thanks Martin.
>
>
> I don't think we have tests yet that ensure Either completion
> when only
> one task completes.
> Consider writing one normal async supplier and one that waits on a
> latch; ensure that the Either future completes with the normal
> value,
> then trip the latch to allow the second one to finish.
>
>
> Great idea. Here you go:
>
> http://cr.openjdk.java.net/~__chegar/8012237/webrev.01/__webrev/test/java/util/__concurrent/CompletableFuture/__Basic.java.udiff.html
> <http://cr.openjdk.java.net/~chegar/8012237/webrev.01/webrev/test/java/util/concurrent/CompletableFuture/Basic.java.udiff.html>
>
> -Chris.
>
>
>
> On Mon, Apr 15, 2013 at 7:09 AM, Chris Hegarty
> <chris.hegarty at oracle.com <mailto:chris.hegarty at oracle.com>
> <mailto:chris.hegarty at oracle.__com
> <mailto:chris.hegarty at oracle.com>>> wrote:
>
> I missed three cases in the previous change [1]. That will
> teach me
> for working on the weekend ;-)
>
> A full audit of the use of the XxxEitherXxx methods in the
> test has
> been done, and there are still three particular checks that are
> possibly incorrect. The failure is not always seen as this
> is racy code.
>
> http://cr.openjdk.java.net/~____chegar/8012237/webrev.00/____webrev/test/java/util/____concurrent/CompletableFuture/____Basic.java.udiff.html
> <http://cr.openjdk.java.net/~__chegar/8012237/webrev.00/__webrev/test/java/util/__concurrent/CompletableFuture/__Basic.java.udiff.html>
>
> <http://cr.openjdk.java.net/~__chegar/8012237/webrev.00/__webrev/test/java/util/__concurrent/CompletableFuture/__Basic.java.udiff.html
> <http://cr.openjdk.java.net/~chegar/8012237/webrev.00/webrev/test/java/util/concurrent/CompletableFuture/Basic.java.udiff.html>>
>
> Thanks,
> -Chris.
>
> [1]
> http://mail.openjdk.java.net/____pipermail/core-libs-dev/2013-____April/016013.html
> <http://mail.openjdk.java.net/__pipermail/core-libs-dev/2013-__April/016013.html>
> <http://mail.openjdk.java.net/__pipermail/core-libs-dev/2013-__April/016013.html
> <http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-April/016013.html>>
>
>
>
More information about the core-libs-dev
mailing list