private void convertJunitCoreParameters()

in maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java [1543:1597]


    private void convertJunitCoreParameters() throws MojoExecutionException {
        checkThreadCountEntity(getThreadCountSuites(), "suites");
        checkThreadCountEntity(getThreadCountClasses(), "classes");
        checkThreadCountEntity(getThreadCountMethods(), "methods");

        String usedParallel = (getParallel() != null) ? getParallel() : "none";

        if (!"none".equals(usedParallel)) {
            checkNonForkedThreads(parallel);
        }

        getProperties().setProperty(ProviderParameterNames.PARALLEL_PROP, usedParallel);
        if (this.getThreadCount() > 0) {
            getProperties().setProperty(ProviderParameterNames.THREADCOUNT_PROP, Integer.toString(getThreadCount()));
        }
        getProperties().setProperty("perCoreThreadCount", Boolean.toString(getPerCoreThreadCount()));
        getProperties().setProperty("useUnlimitedThreads", Boolean.toString(getUseUnlimitedThreads()));
        getProperties()
                .setProperty(ProviderParameterNames.THREADCOUNTSUITES_PROP, Integer.toString(getThreadCountSuites()));
        getProperties()
                .setProperty(ProviderParameterNames.THREADCOUNTCLASSES_PROP, Integer.toString(getThreadCountClasses()));
        getProperties()
                .setProperty(ProviderParameterNames.THREADCOUNTMETHODS_PROP, Integer.toString(getThreadCountMethods()));
        getProperties()
                .setProperty(
                        ProviderParameterNames.PARALLEL_TIMEOUT_PROP,
                        Double.toString(getParallelTestsTimeoutInSeconds()));
        getProperties()
                .setProperty(
                        ProviderParameterNames.PARALLEL_TIMEOUTFORCED_PROP,
                        Double.toString(getParallelTestsTimeoutForcedInSeconds()));
        getProperties()
                .setProperty(ProviderParameterNames.PARALLEL_OPTIMIZE_PROP, Boolean.toString(isParallelOptimized()));
        getProperties()
                .setProperty(
                        ProviderParameterNames.ENABLE_OUT_ERR_ELEMENTS_PROP,
                        Boolean.toString(isEnableOutErrElements()));
        getProperties()
                .setProperty(
                        ProviderParameterNames.ENABLE_PROPERTIES_ELEMENT_PROP,
                        Boolean.toString(isEnablePropertiesElement()));

        String message = "parallel='" + usedParallel + '\''
                + ", perCoreThreadCount=" + getPerCoreThreadCount()
                + ", threadCount=" + getThreadCount()
                + ", useUnlimitedThreads=" + getUseUnlimitedThreads()
                + ", threadCountSuites=" + getThreadCountSuites()
                + ", threadCountClasses=" + getThreadCountClasses()
                + ", threadCountMethods=" + getThreadCountMethods()
                + ", parallelOptimized=" + isParallelOptimized()
                + ", enableOutErrElements=" + isEnableOutErrElements()
                + ", enablePropertiesElement=" + isEnablePropertiesElement();

        logDebugOrCliShowErrors(message);
    }