4143 |
|
* A demo of scalability - runtime is O(n). |
4144 |
|
*/ |
4145 |
|
public void testManyDependents() throws Throwable { |
4146 |
< |
final int n = 1_000; |
4146 |
> |
final int n = expensiveTests ? 1_000_000 : 10; |
4147 |
|
final CompletableFuture<Void> head = new CompletableFuture<>(); |
4148 |
|
final CompletableFuture<Void> complete = CompletableFuture.completedFuture((Void)null); |
4149 |
|
final AtomicInteger count = new AtomicInteger(0); |
4170 |
|
assertEquals(5 * 3 * n, count.get()); |
4171 |
|
} |
4172 |
|
|
4173 |
< |
/** ant -Dvmoptions=-Xmx8m -Djsr166.tckTestClass=CompletableFutureTest tck */ |
4174 |
< |
public void testCoCompletionGarbage() throws Throwable { |
4175 |
< |
// final int n = 3_000_000; |
4176 |
< |
final int n = 100; |
4173 |
> |
/** ant -Dvmoptions=-Xmx8m -Djsr166.expensiveTests=true -Djsr166.tckTestClass=CompletableFutureTest tck */ |
4174 |
> |
public void testCoCompletionGarbageRetention() throws Throwable { |
4175 |
> |
final int n = expensiveTests ? 1_000_000 : 10; |
4176 |
|
final CompletableFuture<Integer> incomplete = new CompletableFuture<>(); |
4177 |
|
CompletableFuture<Integer> f; |
4178 |
|
for (int i = 0; i < n; i++) { |