Package org.junit.runners.model

Examples of org.junit.runners.model.RunnerScheduler


*
*/
public class RunnerUtil {

    public static RunnerScheduler getScheduler(Class<?> testClass) {
        RunnerScheduler scheduler = null;
        TestPolicy testPolicy = testClass.getAnnotation(TestPolicy.class);
        if (testPolicy != null) {
            Class<?> policyClass = testPolicy.value();
            scheduler = SchedulerStrategy.getScheduler(policyClass, false);
            RunnerScheduler testClassScheduler = SchedulerStrategy.getScheduler(testClass, true);
            if (testClassScheduler != null) {
                scheduler = testClassScheduler;
            }

        } else {
View Full Code Here


        return new ParallelComputer(false, true);
    }

    private static Runner parallelize(Runner runner) {
        if (runner instanceof ParentRunner) {
            ((ParentRunner<?>) runner).setScheduler(new RunnerScheduler() {
                private final ExecutorService fService = Executors.newCachedThreadPool();

                public void schedule(Runnable childStatement) {
                    fService.submit(childStatement);
                }
View Full Code Here

TOP

Related Classes of org.junit.runners.model.RunnerScheduler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.