Class ParallelComputerBuilder.PC
- java.lang.Object
-
- org.junit.runner.Computer
-
- org.apache.maven.surefire.junitcore.pc.ParallelComputer
-
- org.apache.maven.surefire.junitcore.pc.ParallelComputerBuilder.PC
-
- Enclosing class:
- ParallelComputerBuilder
final class ParallelComputerBuilder.PC extends ParallelComputer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classParallelComputerBuilder.PC.SuiteFilter
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<Type,java.lang.Integer>allGroupsprivate java.util.Collection<org.junit.runners.ParentRunner>classesprivate Schedulermasterprivate java.util.Collection<org.junit.runners.ParentRunner>nestedClassesprivate longnestedClassesChildrenprivate java.util.Collection<org.junit.runners.ParentRunner>nestedSuitesprivate java.util.Collection<org.junit.runner.Runner>notParallelRunnersprivate SingleThreadSchedulernotThreadSafeTestsprivate intpoolCapacityprivate booleansplitPoolprivate java.util.Collection<org.junit.runners.ParentRunner>suites
-
Constructor Summary
Constructors Modifier Constructor Description privatePC()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleancanSchedule(org.junit.runner.Runner runner)private intcountChildren(org.junit.runner.Runner runner)private intcountFinalRunners()private org.junit.runners.ParentRunnercreateFinalRunner(java.util.List<org.junit.runner.Runner> runners)private SchedulercreateMaster(java.util.concurrent.ExecutorService pool, int poolSize)private java.util.concurrent.ExecutorServicecreatePool(int poolSize)private SchedulercreateScheduler(int poolSize)private SchedulercreateScheduler(org.junit.runner.Description desc, java.util.concurrent.ExecutorService pool, boolean doParallel, Balancer concurrency)protected ShutdownResultdescribeStopped(boolean shutdownNow)private voiddetermineThreadCounts(long suites, long classes, long methods)(package private) java.util.Collection<org.junit.runners.ParentRunner>getClasses()(package private) java.util.Collection<org.junit.runners.ParentRunner>getNestedClasses()(package private) java.util.Collection<org.junit.runners.ParentRunner>getNestedSuites()(package private) java.util.Collection<org.junit.runner.Runner>getNotParallelRunners()(package private) intgetPoolCapacity()protected org.junit.runner.RunnergetRunner(org.junit.runners.model.RunnerBuilder builder, java.lang.Class<?> testClass)org.junit.runner.RunnergetSuite(org.junit.runners.model.RunnerBuilder builder, java.lang.Class<?>[] cls)(package private) java.util.Collection<org.junit.runners.ParentRunner>getSuites()(package private) booleanisSplitPool()private booleanisThreadSafe(org.junit.runner.Runner runner)private voidpopulateChildrenFromSuites()private voidsetSchedulers(java.lang.Iterable<? extends org.junit.runners.ParentRunner> runners, int poolSize, java.util.concurrent.ExecutorService commonPool)private org.junit.runner.RunnersetSchedulers(org.junit.runners.ParentRunner suiteSuites, org.junit.runners.ParentRunner suiteClasses)protected booleanshutdownThreadPoolsAwaitingKilled()private inttotalPoolSize()private <T extends org.junit.runner.Runner>
WrappedRunnerswrapRunners(java.util.Collection<T> runners)-
Methods inherited from class org.apache.maven.surefire.junitcore.pc.ParallelComputer
afterRunQuietly, beforeRunQuietly, describeElapsedTimeout
-
-
-
-
Field Detail
-
notThreadSafeTests
private final SingleThreadScheduler notThreadSafeTests
-
suites
private final java.util.Collection<org.junit.runners.ParentRunner> suites
-
nestedSuites
private final java.util.Collection<org.junit.runners.ParentRunner> nestedSuites
-
classes
private final java.util.Collection<org.junit.runners.ParentRunner> classes
-
nestedClasses
private final java.util.Collection<org.junit.runners.ParentRunner> nestedClasses
-
notParallelRunners
private final java.util.Collection<org.junit.runner.Runner> notParallelRunners
-
poolCapacity
private int poolCapacity
-
splitPool
private boolean splitPool
-
allGroups
private final java.util.Map<Type,java.lang.Integer> allGroups
-
nestedClassesChildren
private long nestedClassesChildren
-
master
private volatile Scheduler master
-
-
Method Detail
-
getSuites
java.util.Collection<org.junit.runners.ParentRunner> getSuites()
-
getNestedSuites
java.util.Collection<org.junit.runners.ParentRunner> getNestedSuites()
-
getClasses
java.util.Collection<org.junit.runners.ParentRunner> getClasses()
-
getNestedClasses
java.util.Collection<org.junit.runners.ParentRunner> getNestedClasses()
-
getNotParallelRunners
java.util.Collection<org.junit.runner.Runner> getNotParallelRunners()
-
getPoolCapacity
int getPoolCapacity()
-
isSplitPool
boolean isSplitPool()
-
describeStopped
protected ShutdownResult describeStopped(boolean shutdownNow)
- Specified by:
describeStoppedin classParallelComputer
-
shutdownThreadPoolsAwaitingKilled
protected boolean shutdownThreadPoolsAwaitingKilled()
- Specified by:
shutdownThreadPoolsAwaitingKilledin classParallelComputer
-
getSuite
public org.junit.runner.Runner getSuite(org.junit.runners.model.RunnerBuilder builder, java.lang.Class<?>[] cls) throws org.junit.runners.model.InitializationError- Overrides:
getSuitein classorg.junit.runner.Computer- Throws:
org.junit.runners.model.InitializationError
-
getRunner
protected org.junit.runner.Runner getRunner(org.junit.runners.model.RunnerBuilder builder, java.lang.Class<?> testClass) throws java.lang.Throwable- Overrides:
getRunnerin classorg.junit.runner.Computer- Throws:
java.lang.Throwable
-
determineThreadCounts
private void determineThreadCounts(long suites, long classes, long methods) throws TestSetFailedException- Throws:
TestSetFailedException
-
wrapRunners
private <T extends org.junit.runner.Runner> WrappedRunners wrapRunners(java.util.Collection<T> runners) throws org.junit.runners.model.InitializationError
- Throws:
org.junit.runners.model.InitializationError
-
countChildren
private int countChildren(org.junit.runner.Runner runner)
-
createPool
private java.util.concurrent.ExecutorService createPool(int poolSize)
-
createMaster
private Scheduler createMaster(java.util.concurrent.ExecutorService pool, int poolSize)
-
countFinalRunners
private int countFinalRunners()
-
populateChildrenFromSuites
private void populateChildrenFromSuites()
-
totalPoolSize
private int totalPoolSize()
-
setSchedulers
private org.junit.runner.Runner setSchedulers(org.junit.runners.ParentRunner suiteSuites, org.junit.runners.ParentRunner suiteClasses) throws org.junit.runners.model.InitializationError- Throws:
org.junit.runners.model.InitializationError
-
createFinalRunner
private org.junit.runners.ParentRunner createFinalRunner(java.util.List<org.junit.runner.Runner> runners) throws org.junit.runners.model.InitializationError- Throws:
org.junit.runners.model.InitializationError
-
setSchedulers
private void setSchedulers(java.lang.Iterable<? extends org.junit.runners.ParentRunner> runners, int poolSize, java.util.concurrent.ExecutorService commonPool)
-
createScheduler
private Scheduler createScheduler(org.junit.runner.Description desc, java.util.concurrent.ExecutorService pool, boolean doParallel, Balancer concurrency)
-
createScheduler
private Scheduler createScheduler(int poolSize)
-
canSchedule
private boolean canSchedule(org.junit.runner.Runner runner)
-
isThreadSafe
private boolean isThreadSafe(org.junit.runner.Runner runner)
-
-