Skip to content

Commit

Permalink
8294705: Disable an assertion in test/jdk/java/util/DoubleStreamSums/…
Browse files Browse the repository at this point in the history
…CompensatedSums.java

Backport-of: c08ff2c7b88e94885f6b4701654a9e47e49567b0
  • Loading branch information
mrserb committed Jan 27, 2023
1 parent 60d46cd commit 644b50e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/jdk/java/util/DoubleStreamSums/CompensatedSums.java
Expand Up @@ -91,7 +91,13 @@ public void testCompensatedSums() {
}

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);
Expand Down Expand Up @@ -144,4 +150,4 @@ static double computeFinalSum(double[] summands) {
ll[2] += rr[2];
};

}
}

1 comment on commit 644b50e

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.