in junit-addons/src/main/java/com/mycila/junit/concurrent/ConcurrentRunnerScheduler.java [55:71]
public void finished() throws ConcurrentException {
try {
while (!tasks.isEmpty()) {
Future<Void> f = completionService.take();
tasks.remove(f);
f.get();
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} catch (ExecutionException e) {
throw ConcurrentException.wrap(e.getCause());
} finally {
while (!tasks.isEmpty())
tasks.poll().cancel(true);
executorService.shutdownNow();
}
}