Examples of JUnitCoreParameters


Examples of org.apache.maven.surefire.junitcore.JUnitCoreParameters

        Properties properties = new Properties();
        properties.setProperty( PARALLEL_KEY, "all" );
        properties.setProperty( THREADCOUNT_KEY, "14" );
        properties.setProperty( THREADCOUNTSUITES_KEY, "2" );
        properties.setProperty( THREADCOUNTCLASSES_KEY, "4" );
        JUnitCoreParameters params = new JUnitCoreParameters( properties );
        RunnerCounter counter = new RunnerCounter( 3, 5, 20 );
        Concurrency concurrency = resolveConcurrency( params, counter );
        assertTrue( params.isParallelSuites() );
        assertTrue( params.isParallelClasses() );
        assertTrue( params.isParallelMethods() );
        assertThat( concurrency.capacity, is( 14 * cpu ) );
        assertThat( concurrency.suites, is( Math.min( 2 * cpu, 3 ) ) );
        assertThat( concurrency.classes, is( Math.min( 4 * cpu, 5 ) ) );
        assertThat( concurrency.methods, is( Integer.MAX_VALUE ) );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.