Examples of RunResult


Examples of org.apache.maven.surefire.suite.RunResult

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

        RunResult runResult;

        try
        {
            final int timeout = forkedProcessTimeoutInSeconds > 0 ? forkedProcessTimeoutInSeconds : 0;
            final int result =
View Full Code Here

Examples of org.apache.maven.surefire.suite.RunResult

    }

    private void writeSummary( Summary summary )
        throws MojoFailureException
    {
        RunResult result = summary.getResultOfLastSuccessfulRun();
        SurefireHelper.reportExecution( this, result, getLog() );
    }
View Full Code Here

Examples of org.apache.maven.surefire.suite.RunResult

    private FailsafeSummary createFailsafeSummaryFromSummary( Summary summary )
    {
        FailsafeSummary failsafeSummary = new FailsafeSummary();
        if ( summary.isErrorFree() )
        {
            RunResult result = summary.getResultOfLastSuccessfulRun();
            if ( result != null )
            {
                failsafeSummary.setResult( result.getForkedProcessCode() );
            }
        }
        else
        {
            failsafeSummary.setResult( ProviderConfiguration.TESTS_FAILED_EXIT_CODE );
View Full Code Here

Examples of org.apache.maven.surefire.suite.RunResult

        return new ForkingRunListener( originalSystemOut, testSetChannelId++, isTrimstackTrace.booleanValue() );
    }

    public RunResult close()
    {
        return new RunResult( 17, 17, 17, 17 );
    }
View Full Code Here

Examples of org.apache.maven.surefire.suite.RunResult

        ForkConfiguration forkConfiguration = getForkConfiguration();
        summary.reportForkConfiguration( forkConfiguration );
        ClassLoaderConfiguration classLoaderConfiguration = getClassLoaderConfiguration( forkConfiguration );
        try
        {
            final RunResult result;
            if ( ForkConfiguration.FORK_NEVER.equals( forkConfiguration.getForkMode() ) )
            {
                InPluginVMSurefireStarter surefireStarter =
                    createInprocessStarter( provider, forkConfiguration, classLoaderConfiguration );
                result = surefireStarter.runSuitesInProcess();
View Full Code Here

Examples of org.apache.maven.surefire.suite.RunResult

        assertFalse( summary.isFailureOrTimeout() );
    }

    public void testSummaryReturnsFailureOrTimeOutStateOfLastRun()
    {
        RunResult resultWithoutFailure = new RunResult( 0, 0, 0, 0, false, false );
        RunResult resultWithFailure = new RunResult( 0, 0, 0, 0, true, true );
        summary.registerRunResult( resultWithoutFailure );
        summary.registerRunResult( resultWithFailure );
        assertTrue( summary.isFailureOrTimeout() );
    }
View Full Code Here

Examples of org.apache.maven.surefire.suite.RunResult

        assertNull( summary.getResultOfLastSuccessfulRun() );
    }

    public void testSummaryReturnsTheSecondOfTwoResult()
    {
        RunResult resultOne = new RunResult( 0, 0, 0, 0 );
        RunResult resultTwo = new RunResult( 0, 0, 0, 0 );
        summary.registerRunResult( resultOne );
        summary.registerRunResult( resultTwo );
        assertEquals( "Wrong exception.", resultTwo, summary.getResultOfLastSuccessfulRun() );
    }
View Full Code Here

Examples of org.apache.maven.surefire.suite.RunResult

            new ArrayList<org.junit.runner.notification.RunListener>();
        customRunListeners.add( 0, jUnit4RunListener );

        JUnitCoreWrapper.execute( testsToRun, jUnitCoreParameters, customRunListeners, null );

        RunResult result = reporterFactory.close();

        Assert.assertEquals( "JUnit should report correctly number of test ran(Finished)", 1,
                             result.getCompletedCount() );

    }
View Full Code Here

Examples of org.apache.maven.surefire.suite.RunResult

    public RunResult run( SurefireProperties effectiveSystemProperties, DefaultScanResult scanResult,
                          String requestedForkMode )
        throws SurefireBooterForkException, SurefireExecutionException
    {
        final RunResult result;
        try
        {
            Properties providerProperties = providerConfiguration.getProviderProperties();
            scanResult.writeTo( providerProperties );
            if ( ForkConfiguration.FORK_ONCE.equals( requestedForkMode ) )
View Full Code Here

Examples of org.apache.maven.surefire.suite.RunResult

                                                                  new ArrayBlockingQueue<Runnable>( forkCount ) );

        try
        {
            // Ask to the executorService to run all tasks
            RunResult globalResult = new RunResult( 0, 0, 0, 0 );

            List<Class<?>> suites = new ArrayList<Class<?>>();
            Iterator<Class<?>> suitesIterator = getSuitesIterator();
            while ( suitesIterator.hasNext() )
            {
                suites.add( suitesIterator.next() );
            }
            final Queue<String> messageQueue = new ConcurrentLinkedQueue<String>();
            for ( Class<?> clazz : suites )
            {
                messageQueue.add( clazz.getName() );
            }

            for ( int threadNum = 0; threadNum < forkCount && threadNum < suites.size(); threadNum++ )
            {
                final int finalThreadNumber = threadNum + 1;

                Callable<RunResult> pf = new Callable<RunResult>()
                {
                    public RunResult call()
                        throws Exception
                    {
                        TestProvidingInputStream testProvidingInputStream =
                            new TestProvidingInputStream( messageQueue );

                        ForkClient forkClient =
                            new ForkClient( defaultReporterFactory, startupReportConfiguration.getTestVmSystemProperties(),
                                            testProvidingInputStream );

                        return fork( null, new PropertiesWrapper( providerConfiguration.getProviderProperties() ),
                                     forkClient, effectiveSystemProperties, finalThreadNumber,
                                     testProvidingInputStream );
                    }
                };

                results.add( executorService.submit( pf ) );
            }

            for ( Future<RunResult> result : results )
            {
                try
                {
                    RunResult cur = result.get();
                    if ( cur != null )
                    {
                        globalResult = globalResult.aggregate( cur );
                    }
                    else
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.