958 |
|
public void testConsumeNPE() { |
959 |
|
SubmissionPublisher<Integer> p = basicPublisher(); |
960 |
|
try { |
961 |
< |
CompletableFuture<Void> f = p.consume(null); |
961 |
> |
CompletableFuture<Void> unused = p.consume(null); |
962 |
|
shouldThrow(); |
963 |
|
} catch (NullPointerException success) {} |
964 |
|
} |
984 |
|
*/ |
985 |
|
public void testMissedSignal_8187947() throws Exception { |
986 |
|
if (!atLeastJava9()) return; // backport to jdk8 too hard |
987 |
< |
final int N = expensiveTests ? (1 << 20) : (1 << 10); |
987 |
> |
final int N = |
988 |
> |
((ForkJoinPool.getCommonPoolParallelism() < 2) // JDK-8212899 |
989 |
> |
? (1 << 5) |
990 |
> |
: (1 << 10)) |
991 |
> |
* (expensiveTests ? (1 << 10) : 1); |
992 |
|
final CountDownLatch finished = new CountDownLatch(1); |
993 |
|
final SubmissionPublisher<Boolean> pub = new SubmissionPublisher<>(); |
994 |
|
class Sub implements Subscriber<Boolean> { |