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
  • Field Details

    • notThreadSafeTests

      private final SingleThreadScheduler notThreadSafeTests
    • suites

      private final Collection<org.junit.runners.ParentRunner> suites
    • nestedSuites

      private final Collection<org.junit.runners.ParentRunner> nestedSuites
    • classes

      private final Collection<org.junit.runners.ParentRunner> classes
    • nestedClasses

      private final Collection<org.junit.runners.ParentRunner> nestedClasses
    • notParallelRunners

      private final Collection<org.junit.runner.Runner> notParallelRunners
    • poolCapacity

      private int poolCapacity
    • splitPool

      private boolean splitPool
    • allGroups

      private final Map<Type,Integer> allGroups
    • nestedClassesChildren

      private long nestedClassesChildren
    • master

      private volatile Scheduler 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

      protected ShutdownResult describeStopped(boolean shutdownNow)
      Specified by:
      describeStopped in class ParallelComputer
    • shutdownThreadPoolsAwaitingKilled

      protected boolean shutdownThreadPoolsAwaitingKilled()
      Specified by:
      shutdownThreadPoolsAwaitingKilled in class ParallelComputer
    • getSuite

      public org.junit.runner.Runner getSuite(org.junit.runners.model.RunnerBuilder builder, Class<?>[] cls) throws org.junit.runners.model.InitializationError
      Overrides:
      getSuite in class org.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 class org.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

      private ExecutorService createPool(int poolSize)
    • createMaster

      private Scheduler createMaster(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(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

      private Scheduler createScheduler(int poolSize)
    • canSchedule

      private boolean canSchedule(org.junit.runner.Runner runner)
    • isThreadSafe

      private boolean isThreadSafe(org.junit.runner.Runner runner)