public class ConcurrentRunnerScheduler extends Object implements org.junit.runners.model.RunnerScheduler
| Constructor and Description |
|---|
ConcurrentRunnerScheduler(boolean defaultParallel,
int numThreads)
A concurrent scheduler to run junit tests in parallel if possible, followed by tests that can
only be run in serial.
|
| Modifier and Type | Method and Description |
|---|---|
void |
finished() |
void |
schedule(Runnable childStatement) |
void |
schedule(Runnable childStatement,
Class<?> clazz)
Schedule a test childStatement associated with clazz, using clazz's policy to decide running
in serial or parallel.
|
public ConcurrentRunnerScheduler(boolean defaultParallel,
int numThreads)
TestSerial will be run in serial.
Test classes annotated with TestParallel will be run in parallel.
Test classes without neither annotation will be run in parallel if defaultParallel is set.
Call ParentRunner.setScheduler(org.junit.runners.model.RunnerScheduler) to use this scheduler.defaultParallel - whether to unannotated classes in parallelnumThreads - number of parallel threads to use, must be positive.public void schedule(Runnable childStatement)
schedule in interface org.junit.runners.model.RunnerSchedulerpublic void schedule(Runnable childStatement, Class<?> clazz)
public void finished()
finished in interface org.junit.runners.model.RunnerScheduler