Examples of ForkingStreamConsumer


Examples of org.apache.maven.surefire.booter.output.ForkingStreamConsumer

        if (systemProperties != null) {
            cli.createArg().setFile(systemProperties);
        }

        ForkingStreamConsumer out = getForkingStreamConsumer(showHeading, showFooter, redirectTestOutputToFile);

        StreamConsumer err;

        if (redirectTestOutputToFile) {
            err = out;
        } else {
            err = getForkingStreamConsumer(showHeading, showFooter, redirectTestOutputToFile);
        }

        if (forkConfiguration.isDebug()) {
            System.out.println("Forking command line: " + cli);
        }

        int returnCode;

        try {
            returnCode =
                org.apache.maven.surefire.booter.shade.org.codehaus.plexus.util.cli.CommandLineUtils
                    .executeCommandLine(cli, out, err, forkedProcessTimeoutInSeconds);
        } catch (org.apache.maven.surefire.booter.shade.org.codehaus.plexus.util.cli.CommandLineException e) {
            throw new SurefireBooterForkException("Error while executing forked tests.", e);
        }

        if (redirectTestOutputToFile) {
            // ensure the FileOutputConsumerProxy flushes/closes the output file
            try {
                out.getOutputConsumer().testSetCompleted();
            } catch (Exception e) {
                // the FileOutputConsumerProxy might throw an IllegalStateException but that's not of interest now
            }
        }
View Full Code Here

Examples of org.apache.maven.surefire.booter.output.ForkingStreamConsumer

        }
        if (!showFooter) {
            outputConsumer = new SupressFooterOutputConsumerProxy(outputConsumer);
        }

        return new ForkingStreamConsumer(outputConsumer);
    }
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.