changeset 52885:5e2625783d58

8212899: java/util/concurrent/tck/JSR166TestCase.java - testMissedSignal_8187947(SubmissionPublisherTest): timed out waiting for CountDownLatch for 40 sec Reviewed-by: martin, dholmes
author dl
date Wed, 28 Nov 2018 15:25:14 -0800
parents 396dfb0e8ba5
children 0775f246731b
files test/jdk/java/util/concurrent/tck/SubmissionPublisherTest.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/java/util/concurrent/tck/SubmissionPublisherTest.java	Wed Nov 28 14:28:28 2018 -0800
+++ b/test/jdk/java/util/concurrent/tck/SubmissionPublisherTest.java	Wed Nov 28 15:25:14 2018 -0800
@@ -1011,7 +1011,11 @@
      */
     public void testMissedSignal_8187947() throws Exception {
         if (!atLeastJava9()) return; // backport to jdk8 too hard
-        final int N = expensiveTests ? (1 << 20) : (1 << 10);
+        final int N =
+            ((ForkJoinPool.getCommonPoolParallelism() < 2) // JDK-8212899
+             ? (1 << 5)
+             : (1 << 10))
+            * (expensiveTests ? (1 << 10) : 1);
         final CountDownLatch finished = new CountDownLatch(1);
         final SubmissionPublisher<Boolean> pub = new SubmissionPublisher<>();
         class Sub implements Subscriber<Boolean> {