* Utility method to get the Scheduler for Suite class
* @param suiteClass the suiteClass
* @return an instance of {@link RunnerScheduler}
*/
public static RunnerScheduler getSchedulerForSuite(Class<?> suiteClass) {
ParallelSuite parallelSuite = suiteClass.getAnnotation(ParallelSuite.class);
if(parallelSuite != null) {
if(parallelSuite.threads() <=0) {
return new ParallelScheduler();
} else {
return new ParallelScheduler(parallelSuite.threads());
}
}
return new SerialScheduler();
}