test/java/util/concurrent/FutureTask/CancelledFutureLoops.java
Print this page
*** 32,42 ****
*/
/*
* @test
* @bug 4486658
! * @compile CancelledFutureLoops.java
* @run main/timeout=2000 CancelledFutureLoops
* @summary Checks for responsiveness of futures to cancellation.
* Runs under the assumption that ITERS computations require more than
* TIMEOUT msecs to complete.
*/
--- 32,42 ----
*/
/*
* @test
* @bug 4486658
! * @compile -source 1.5 CancelledFutureLoops.java
* @run main/timeout=2000 CancelledFutureLoops
* @summary Checks for responsiveness of futures to cancellation.
* Runs under the assumption that ITERS computations require more than
* TIMEOUT msecs to complete.
*/
*** 62,75 ****
for (int i = 2; i <= maxThreads; i += (i+1) >>> 1) {
System.out.print("Threads: " + i);
try {
new FutureLoop(i).test();
}
! catch(BrokenBarrierException bb) {
// OK; ignore
}
! catch(ExecutionException ee) {
// OK; ignore
}
Thread.sleep(TIMEOUT);
}
pool.shutdown();
--- 62,75 ----
for (int i = 2; i <= maxThreads; i += (i+1) >>> 1) {
System.out.print("Threads: " + i);
try {
new FutureLoop(i).test();
}
! catch (BrokenBarrierException bb) {
// OK; ignore
}
! catch (ExecutionException ee) {
// OK; ignore
}
Thread.sleep(TIMEOUT);
}
pool.shutdown();