From c08ff2c7b88e94885f6b4701654a9e47e49567b0 Mon Sep 17 00:00:00 2001 From: Raffaello Giulietti Date: Thu, 20 Oct 2022 10:47:39 +0000 Subject: [PATCH] 8294705: Disable an assertion in test/jdk/java/util/DoubleStreamSums/CompensatedSums.java Reviewed-by: bpb --- .../java/util/DoubleStreamSums/CompensatedSums.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/jdk/java/util/DoubleStreamSums/CompensatedSums.java b/test/jdk/java/util/DoubleStreamSums/CompensatedSums.java index 5dfeab142da..3d5ce9feb48 100644 --- a/test/jdk/java/util/DoubleStreamSums/CompensatedSums.java +++ b/test/jdk/java/util/DoubleStreamSums/CompensatedSums.java @@ -91,7 +91,13 @@ public class CompensatedSums { } Assert.assertTrue(jdkParallelStreamError <= goodParallelStreamError); - Assert.assertTrue(badParallelStreamError >= jdkParallelStreamError); + /* + * Due to floating-point addition being inherently non-associative, + * and due to the unpredictable scheduling of the threads used + * in parallel streams, this assertion can fail intermittently, + * hence is suppressed for now. + */ + // Assert.assertTrue(badParallelStreamError >= jdkParallelStreamError); Assert.assertTrue(goodSequentialStreamError >= jdkSequentialStreamError); Assert.assertTrue(naive > jdkSequentialStreamError); @@ -144,4 +150,4 @@ public class CompensatedSums { ll[2] += rr[2]; }; -} \ No newline at end of file +}