8212899: java/util/concurrent/tck/JSR166TestCase.java - testMissedSignal_8187947(SubmissionPublisherTest): timed out waiting for CountDownLatch for 40 sec
authordl
Wed, 28 Nov 2018 15:25:14 -0800
changeset 52728 5e2625783d58
parent 52727 396dfb0e8ba5
child 52729 0775f246731b
8212899: java/util/concurrent/tck/JSR166TestCase.java - testMissedSignal_8187947(SubmissionPublisherTest): timed out waiting for CountDownLatch for 40 sec Reviewed-by: martin, dholmes
test/jdk/java/util/concurrent/tck/SubmissionPublisherTest.java
--- 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> {