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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Collection<org.junit.runners.ParentRunner>
private Scheduler
private final Collection<org.junit.runners.ParentRunner>
private long
private final Collection<org.junit.runners.ParentRunner>
private final Collection<org.junit.runner.Runner>
private final SingleThreadScheduler
private int
private boolean
private final Collection<org.junit.runners.ParentRunner>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
canSchedule
(org.junit.runner.Runner runner) private int
countChildren
(org.junit.runner.Runner runner) private int
private org.junit.runners.ParentRunner
createFinalRunner
(List<org.junit.runner.Runner> runners) private Scheduler
createMaster
(ExecutorService pool, int poolSize) private ExecutorService
createPool
(int poolSize) private Scheduler
createScheduler
(int poolSize) private Scheduler
createScheduler
(org.junit.runner.Description desc, ExecutorService pool, boolean doParallel, Balancer concurrency) protected ShutdownResult
describeStopped
(boolean shutdownNow) private void
determineThreadCounts
(long suites, long classes, long methods) (package private) Collection<org.junit.runners.ParentRunner>
(package private) Collection<org.junit.runners.ParentRunner>
(package private) Collection<org.junit.runners.ParentRunner>
(package private) Collection<org.junit.runner.Runner>
(package private) int
protected org.junit.runner.Runner
org.junit.runner.Runner
(package private) Collection<org.junit.runners.ParentRunner>
(package private) boolean
private boolean
isThreadSafe
(org.junit.runner.Runner runner) private void
private void
setSchedulers
(Iterable<? extends org.junit.runners.ParentRunner> runners, int poolSize, ExecutorService commonPool) private org.junit.runner.Runner
setSchedulers
(org.junit.runners.ParentRunner suiteSuites, org.junit.runners.ParentRunner suiteClasses) protected boolean
private int
private <T extends org.junit.runner.Runner>
WrappedRunnerswrapRunners
(Collection<T> runners) Methods inherited from class org.apache.maven.surefire.junitcore.pc.ParallelComputer
afterRunQuietly, beforeRunQuietly, describeElapsedTimeout
Methods inherited from class org.junit.runner.Computer
serial
-
Field Details
-
notThreadSafeTests
-
suites
-
nestedSuites
-
classes
-
nestedClasses
-
notParallelRunners
-
poolCapacity
private int poolCapacity -
splitPool
private boolean splitPool -
allGroups
-
nestedClassesChildren
private long nestedClassesChildren -
master
-
-
Constructor Details
-
PC
private PC()
-
-
Method Details
-
getSuites
Collection<org.junit.runners.ParentRunner> getSuites() -
getNestedSuites
Collection<org.junit.runners.ParentRunner> getNestedSuites() -
getClasses
Collection<org.junit.runners.ParentRunner> getClasses() -
getNestedClasses
Collection<org.junit.runners.ParentRunner> getNestedClasses() -
getNotParallelRunners
Collection<org.junit.runner.Runner> getNotParallelRunners() -
getPoolCapacity
int getPoolCapacity() -
isSplitPool
boolean isSplitPool() -
describeStopped
- Specified by:
describeStopped
in classParallelComputer
-
shutdownThreadPoolsAwaitingKilled
protected boolean shutdownThreadPoolsAwaitingKilled()- Specified by:
shutdownThreadPoolsAwaitingKilled
in classParallelComputer
-
getSuite
public org.junit.runner.Runner getSuite(org.junit.runners.model.RunnerBuilder builder, Class<?>[] cls) throws org.junit.runners.model.InitializationError - Overrides:
getSuite
in classorg.junit.runner.Computer
- Throws:
org.junit.runners.model.InitializationError
-
getRunner
protected org.junit.runner.Runner getRunner(org.junit.runners.model.RunnerBuilder builder, Class<?> testClass) throws Throwable - Overrides:
getRunner
in classorg.junit.runner.Computer
- Throws:
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(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
-
createMaster
-
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(List<org.junit.runner.Runner> runners) throws org.junit.runners.model.InitializationError - Throws:
org.junit.runners.model.InitializationError
-
setSchedulers
private void setSchedulers(Iterable<? extends org.junit.runners.ParentRunner> runners, int poolSize, ExecutorService commonPool) -
createScheduler
private Scheduler createScheduler(org.junit.runner.Description desc, ExecutorService pool, boolean doParallel, Balancer concurrency) -
createScheduler
-
canSchedule
private boolean canSchedule(org.junit.runner.Runner runner) -
isThreadSafe
private boolean isThreadSafe(org.junit.runner.Runner runner)
-