continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r587027 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/execution/ continuum-core/src/main/java/org/apache/maven/continuum/core/action/ continuum-core/src/main/java/org/apache/maven/continuum/execution/ c...
Date Mon, 22 Oct 2007 08:15:36 GMT
Author: evenisse
Date: Mon Oct 22 01:15:34 2007
New Revision: 587027

URL: http://svn.apache.org/viewvc?rev=587027&view=rev
Log:
[CONTINUUM-1532] Remove TestResult/SuiteResult/TestCaseFailure from the model

Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
    maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml
    maven/continuum/trunk/continuum-model/src/main/resources/package-mssql.orm
    maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
    maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml
    maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
    maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java?rev=587027&r1=587026&r2=587027&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
Mon Oct 22 01:15:34 2007
@@ -21,7 +21,6 @@
 
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.model.scm.TestResult;
 
 import java.io.File;
 import java.util.List;
@@ -45,8 +44,5 @@
     void killProcess( Project project );
 
     List getDeployableArtifacts( Project project, File workingDirectory, BuildDefinition
buildDefinition )
-        throws ContinuumBuildExecutorException;
-
-    TestResult getTestResults( Project project, int buildResultId )
         throws ContinuumBuildExecutorException;
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java?rev=587027&r1=587026&r2=587027&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
Mon Oct 22 01:15:34 2007
@@ -27,7 +27,6 @@
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.model.scm.TestResult;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumStore;
@@ -153,20 +152,6 @@
             }
 
             project.setState( buildResult.getState() );
-
-            // ----------------------------------------------------------------------
-            // Set the test result
-            // ----------------------------------------------------------------------
-
-            try
-            {
-                TestResult testResult = buildExecutor.getTestResults( project, buildResult.getId()
);
-                buildResult.setTestResult( testResult );
-            }
-            catch ( Throwable t )
-            {
-                getLogger().error( "Error getting test results", t );
-            }
 
             // ----------------------------------------------------------------------
             // Copy over the buildResult result

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?rev=587027&r1=587026&r2=587027&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
Mon Oct 22 01:15:34 2007
@@ -22,7 +22,6 @@
 import org.apache.maven.continuum.installation.InstallationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.model.scm.TestResult;
 import org.apache.maven.continuum.model.system.Installation;
 import org.apache.maven.continuum.model.system.Profile;
 import org.apache.maven.continuum.project.ContinuumProjectState;
@@ -33,7 +32,6 @@
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
-import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
 
@@ -310,12 +308,6 @@
     public File getWorkingDirectory( Project project )
     {
         return workingDirectoryService.getWorkingDirectory( project );
-    }
-
-    public TestResult getTestResults( Project project, int buildResultId )
-        throws ContinuumBuildExecutorException
-    {
-        return null;
     }
 
     public InstallationService getInstallationService()

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java?rev=587027&r1=587026&r2=587027&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
Mon Oct 22 01:15:34 2007
@@ -21,7 +21,6 @@
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.metadata.ArtifactMetadata;
-import org.apache.maven.continuum.configuration.ConfigurationException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.execution.AbstractBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
@@ -31,35 +30,21 @@
 import org.apache.maven.continuum.installation.InstallationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.model.scm.SuiteResult;
-import org.apache.maven.continuum.model.scm.TestCaseFailure;
-import org.apache.maven.continuum.model.scm.TestResult;
 import org.apache.maven.continuum.model.system.Installation;
 import org.apache.maven.continuum.model.system.Profile;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.MavenProjectHelper;
 import org.apache.maven.project.artifact.ProjectArtifactMetadata;
-import org.codehaus.plexus.util.DirectoryScanner;
-import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.util.xml.pull.MXParser;
-import org.codehaus.plexus.util.xml.pull.XmlPullParser;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.text.NumberFormat;
-import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Locale;
 import java.util.Map;
 import java.util.Properties;
 
@@ -298,148 +283,6 @@
         }
 
         return artifacts;
-    }
-
-    public TestResult getTestResults( Project project, int buildId )
-        throws ContinuumBuildExecutorException
-    {
-        File backupDirectory = null;
-        try
-        {
-            backupDirectory = configurationService.getTestReportsDirectory( buildId, project.getId()
);
-            if ( !backupDirectory.exists() )
-            {
-                backupDirectory.mkdirs();
-            }
-        }
-        catch ( ConfigurationException e )
-        {
-            getLogger().info( "error on surefire backup directory creation skip backup "
+ e.getMessage(), e );
-        }
-        return getTestResults( getWorkingDirectory( project ), backupDirectory );
-    }
-
-    private TestResult getTestResults( File workingDir, File backupDirectory )
-        throws ContinuumBuildExecutorException
-    {
-        DirectoryScanner scanner = new DirectoryScanner();
-        scanner.setBasedir( workingDir );
-        scanner.setIncludes(
-            new String[]{"**/target/surefire-reports/TEST-*.xml", "**/target/surefire-it-reports/TEST-*.xml"}
);
-        scanner.scan();
-
-        TestResult testResult = new TestResult();
-        int testCount = 0;
-        int failureCount = 0;
-        int totalTime = 0;
-        String[] testResultFiles = scanner.getIncludedFiles();
-        for ( int i = 0; i < testResultFiles.length; i++ )
-        {
-            File xmlFile = new File( workingDir, testResultFiles[i] );
-            try
-            {
-                if ( backupDirectory != null )
-                {
-                    FileUtils.copyFileToDirectory( xmlFile, backupDirectory );
-                }
-            }
-            catch ( IOException e )
-            {
-                getLogger().info( "failed to backup unit report file " + xmlFile.getPath()
);
-            }
-            SuiteResult suite = new SuiteResult();
-            try
-            {
-                XmlPullParser parser = new MXParser();
-                parser.setInput( new FileReader( xmlFile ) );
-                if ( parser.next() != XmlPullParser.START_TAG || !"testsuite".equals( parser.getName()
) )
-                {
-                    continue;
-                }
-
-                suite.setName( parser.getAttributeValue( null, "name" ) );
-
-                int suiteFailureCount = Integer.parseInt( parser.getAttributeValue( null,
"errors" ) ) +
-                    Integer.parseInt( parser.getAttributeValue( null, "failures" ) );
-
-                String time = parser.getAttributeValue( null, "time" );
-                NumberFormat nf = NumberFormat.getInstance( Locale.ENGLISH );
-                double dTime = 0;
-
-                try
-                {
-                    dTime = nf.parse( time ).doubleValue();
-                }
-                catch ( ParseException nfe )
-                {
-                    getLogger().warn( "Can't parse time value (" + time + ") in " + xmlFile.getAbsolutePath()
);
-                }
-
-                long suiteTotalTime = (long) ( 1000 * dTime );
-
-                // TODO: add tests attribute to testsuite element so we only
-                // have to parse the rest of the file if there are failures
-                int suiteTestCount = 0;
-                while ( !( parser.next() == XmlPullParser.END_TAG && "testsuite".equals(
parser.getName() ) ) )
-                {
-                    if ( parser.getEventType() == XmlPullParser.START_TAG && "testcase".equals(
parser.getName() ) )
-                    {
-                        suiteTestCount++;
-                        String name = parser.getAttributeValue( null, "name" );
-                        do
-                        {
-                            parser.next();
-                        }
-                        while ( parser.getEventType() != XmlPullParser.START_TAG &&
-                            parser.getEventType() != XmlPullParser.END_TAG );
-                        if ( parser.getEventType() == XmlPullParser.START_TAG &&
-                            ( "error".equals( parser.getName() ) || "failure".equals( parser.getName()
) ) )
-                        {
-                            TestCaseFailure failure = new TestCaseFailure();
-                            failure.setName( name );
-                            if ( parser.next() == XmlPullParser.TEXT )
-                            {
-                                String exception = parser.getText();
-                                //TODO: review this part as it include an hardcoded value
of the columnsize
-                                if ( exception.length() >= 8192 )
-                                {
-                                    exception = exception.substring( 0, 8185 ) + "[...]";
-                                }
-                                failure.setException( exception );
-                            }
-                            suite.addFailure( failure );
-                        }
-                    }
-                }
-
-                testCount += suiteTestCount;
-                failureCount += suiteFailureCount;
-                totalTime += suiteTotalTime;
-
-                suite.setTestCount( suiteTestCount );
-                suite.setFailureCount( suiteFailureCount );
-                suite.setTotalTime( suiteTotalTime );
-            }
-            catch ( XmlPullParserException xppex )
-            {
-                throw new ContinuumBuildExecutorException( "Error parsing file: " + xmlFile,
xppex );
-            }
-            catch ( FileNotFoundException fnfex )
-            {
-                throw new ContinuumBuildExecutorException( "Test file not found", fnfex );
-            }
-            catch ( IOException ioex )
-            {
-                throw new ContinuumBuildExecutorException( "Parsing error for file: " + xmlFile,
ioex );
-            }
-            testResult.addSuiteResult( suite );
-        }
-
-        testResult.setTestCount( testCount );
-        testResult.setFailureCount( failureCount );
-        testResult.setTotalTime( totalTime );
-
-        return testResult;
     }
 
     protected Map<String, String> getEnvironments( BuildDefinition buildDefinition
)

Modified: maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml?rev=587027&r1=587026&r2=587027&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml (original)
+++ maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml Mon Oct 22 01:15:34 2007
@@ -549,13 +549,6 @@
           </association>
         </field>
         <field jpox.fetch-groups="build-result-with-details">
-          <name>testResult</name>
-          <version>1.0.9+</version>
-          <association>
-            <type>TestResult</type>
-          </association>
-        </field>
-        <field jpox.fetch-groups="build-result-with-details">
           <name>modifiedDependencies</name>
           <version>1.1.0+</version>
           <association jpox.join="false">
@@ -835,91 +828,6 @@
           ]]></code>
         </codeSegment>
       </codeSegments>
-    </class>
-
-    <class>
-      <name>TestResult</name>
-      <packageName>org.apache.maven.continuum.model.scm</packageName>
-      <version>1.0.9+</version>
-      <fields>
-        <field>
-          <name>testCount</name>
-          <version>1.0.9+</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>failureCount</name>
-          <version>1.0.9+</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>totalTime</name>
-          <version>1.0.9+</version>
-          <type>long</type>
-        </field>
-        <field>
-          <name>suiteResults</name>
-          <version>1.0.9+</version>
-          <association stash.part="true" jpox.join="false">
-            <type>SuiteResult</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-      </fields>
-    </class>
-
-    <class>
-      <name>SuiteResult</name>
-      <packageName>org.apache.maven.continuum.model.scm</packageName>
-      <version>1.0.9+</version>
-      <fields>
-        <field>
-          <name stash.maxSize="512">name</name>
-          <version>1.0.9+</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>testCount</name>
-          <version>1.0.9+</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>failureCount</name>
-          <version>1.0.9+</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>totalTime</name>
-          <version>1.0.9+</version>
-          <type>long</type>
-        </field>
-        <field>
-          <name>failures</name>
-          <version>1.0.9+</version>
-          <association stash.part="true" jpox.join="false">
-            <type>TestCaseFailure</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-      </fields>
-    </class>
-
-    <class>
-      <name>TestCaseFailure</name>
-      <packageName>org.apache.maven.continuum.model.scm</packageName>
-      <version>1.0.9+</version>
-      <fields>
-        <field>
-          <name>name</name>
-          <version>1.0.9+</version>
-          <type>String</type>
-        </field>
-        <field stash.maxSize="8192" jpox.column="exceptionstring">
-          <name>exception</name>
-          <version>1.0.9+</version>
-          <type>String</type>
-        </field>
-      </fields>
     </class>
 
     <class>

Modified: maven/continuum/trunk/continuum-model/src/main/resources/package-mssql.orm
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-model/src/main/resources/package-mssql.orm?rev=587027&r1=587026&r2=587027&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/resources/package-mssql.orm (original)
+++ maven/continuum/trunk/continuum-model/src/main/resources/package-mssql.orm Mon Oct 22
01:15:34 2007
@@ -31,10 +31,5 @@
         <column name="changecomment" length="8000" jdbc-type="VARCHAR"/>
       </field>
     </class>
-    <class name="TestCaseFailure">
-      <field name="exception">
-        <column name="exceptionstring" length="8000" jdbc-type="VARCHAR"/>
-      </field>
-    </class>
   </package>
 </orm>

Modified: maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java?rev=587027&r1=587026&r2=587027&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
(original)
+++ maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
Mon Oct 22 01:15:34 2007
@@ -32,9 +32,6 @@
 import org.apache.maven.continuum.model.scm.ChangeFile;
 import org.apache.maven.continuum.model.scm.ChangeSet;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.model.scm.SuiteResult;
-import org.apache.maven.continuum.model.scm.TestCaseFailure;
-import org.apache.maven.continuum.model.scm.TestResult;
 import org.apache.maven.continuum.model.system.Installation;
 import org.apache.maven.continuum.model.system.Profile;
 import org.apache.maven.continuum.model.system.SystemConfiguration;
@@ -1957,9 +1954,6 @@
         PlexusJdoUtils.removeAll( getPersistenceManager(), Installation.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), ScmResult.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), BuildResult.class );
-        PlexusJdoUtils.removeAll( getPersistenceManager(), TestResult.class );
-        PlexusJdoUtils.removeAll( getPersistenceManager(), SuiteResult.class );
-        PlexusJdoUtils.removeAll( getPersistenceManager(), TestCaseFailure.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), SystemConfiguration.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), ProjectNotifier.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), ProjectDeveloper.class );

Modified: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml?rev=587027&r1=587026&r2=587027&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml
Mon Oct 22 01:15:34 2007
@@ -488,13 +488,6 @@
           </association>
         </field>
         <field>
-          <name>testResult</name>
-          <version>1.1.0+</version>
-          <association>
-            <type>TestResult</type>
-          </association>
-        </field>
-        <field>
           <name>modifiedDependencies</name>
           <version>1.1.0+</version>
           <association>
@@ -771,91 +764,6 @@
           ]]></code>
         </codeSegment>
       </codeSegments>
-    </class>
-
-    <class>
-      <name>TestResult</name>
-      <packageName>org.apache.maven.continuum.xmlrpc.test</packageName>
-      <version>1.1.0+</version>
-      <fields>
-        <field>
-          <name>testCount</name>
-          <version>1.1.0+</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>failureCount</name>
-          <version>1.1.0+</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>totalTime</name>
-          <version>1.1.0+</version>
-          <type>long</type>
-        </field>
-        <field>
-          <name>suiteResults</name>
-          <version>1.1.0+</version>
-          <association>
-            <type>SuiteResult</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-      </fields>
-    </class>
-
-    <class>
-      <name>SuiteResult</name>
-      <packageName>org.apache.maven.continuum.xmlrpc.test</packageName>
-      <version>1.1.0+</version>
-      <fields>
-        <field>
-          <name>name</name>
-          <version>1.1.0+</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>testCount</name>
-          <version>1.1.0+</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>failureCount</name>
-          <version>1.1.0+</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>totalTime</name>
-          <version>1.1.0+</version>
-          <type>long</type>
-        </field>
-        <field>
-          <name>failures</name>
-          <version>1.1.0+</version>
-          <association>
-            <type>TestCaseFailure</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-      </fields>
-    </class>
-
-    <class>
-      <name>TestCaseFailure</name>
-      <packageName>org.apache.maven.continuum.xmlrpc.test</packageName>
-      <version>1.1.0+</version>
-      <fields>
-        <field>
-          <name>name</name>
-          <version>1.1.0+</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>exception</name>
-          <version>1.1.0+</version>
-          <type>String</type>
-        </field>
-      </fields>
     </class>
 
     <class>

Modified: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java?rev=587027&r1=587026&r2=587027&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/client/SampleClient.java
Mon Oct 22 01:15:34 2007
@@ -27,9 +27,6 @@
 import org.apache.maven.continuum.xmlrpc.project.ProjectSummary;
 import org.apache.maven.continuum.xmlrpc.scm.ChangeSet;
 import org.apache.maven.continuum.xmlrpc.scm.ScmResult;
-import org.apache.maven.continuum.xmlrpc.test.SuiteResult;
-import org.apache.maven.continuum.xmlrpc.test.TestCaseFailure;
-import org.apache.maven.continuum.xmlrpc.test.TestResult;
 
 import java.net.URL;
 import java.util.Iterator;
@@ -205,12 +202,6 @@
                 printChangeSet( (ChangeSet) i.next() );
             }
         }
-
-        if ( result.getTestResult() != null )
-        {
-            System.out.println( "TestResult:" );
-            printTestResult( result.getTestResult() );
-        }
     }
 
     public static void printDependency( ProjectDependency dep )
@@ -248,37 +239,6 @@
         if ( changeSet.getFiles() != null )
         {
             System.out.println( "Author: " + changeSet.getFiles() );
-        }
-    }
-
-    public static void printTestResult( TestResult testresult )
-    {
-        System.out.println( "Total Time: " + testresult.getTotalTime() );
-        System.out.println( "Nb Tests: " + testresult.getTestCount() );
-        System.out.println( "Nb Failures: " + testresult.getFailureCount() );
-
-        if ( testresult.getSuiteResults() != null )
-        {
-            System.out.println( "Suite Results:" );
-        }
-    }
-
-    public static void printSuiteResult( SuiteResult result )
-    {
-        System.out.println( "Name: " + result.getName() );
-        System.out.println( "Total Time: " + result.getTotalTime() );
-        System.out.println( "Nb Tests: " + result.getTestCount() );
-        System.out.println( "Nb Failures: " + result.getFailureCount() );
-
-        if ( result.getFailures() != null )
-        {
-            for ( Iterator i = result.getFailures().iterator(); i.hasNext(); )
-            {
-                System.out.println( "Failure:" );
-                TestCaseFailure failure = (TestCaseFailure) i.next();
-                System.out.println( "Name: " + failure.getName() );
-                System.out.println( "Exception: " + failure.getException() );
-            }
         }
     }
 

Modified: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java?rev=587027&r1=587026&r2=587027&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
Mon Oct 22 01:15:34 2007
@@ -42,9 +42,6 @@
 import org.apache.maven.continuum.xmlrpc.scm.ScmResult;
 import org.apache.maven.continuum.xmlrpc.system.Installation;
 import org.apache.maven.continuum.xmlrpc.system.Profile;
-import org.apache.maven.continuum.xmlrpc.test.SuiteResult;
-import org.apache.maven.continuum.xmlrpc.test.TestCaseFailure;
-import org.apache.maven.continuum.xmlrpc.test.TestResult;
 import org.codehaus.plexus.redback.authorization.AuthorizationException;
 import org.codehaus.plexus.redback.role.RoleManager;
 import org.codehaus.plexus.redback.role.RoleManagerException;
@@ -964,7 +961,7 @@
                 br.addModifiedDependency( dep );
             }
         }
-        br.setTestResult( populateTestResult( buildResult.getTestResult() ) );
+
         return br;
     }
 
@@ -1072,70 +1069,6 @@
         res.setName( changeFile.getName() );
         res.setRevision( changeFile.getRevision() );
         res.setStatus( changeFile.getStatus() );
-        return res;
-    }
-
-    private TestResult populateTestResult( org.apache.maven.continuum.model.scm.TestResult
testResult )
-    {
-        if ( testResult == null )
-        {
-            return null;
-        }
-
-        TestResult res = new TestResult();
-        res.setFailureCount( testResult.getFailureCount() );
-
-        if ( testResult.getSuiteResults() != null )
-        {
-            for ( Iterator i = testResult.getSuiteResults().iterator(); i.hasNext(); )
-            {
-                org.apache.maven.continuum.model.scm.SuiteResult suiteResult =
-                    (org.apache.maven.continuum.model.scm.SuiteResult) i.next();
-                res.addSuiteResult( populateSuiteResult( suiteResult ) );
-            }
-        }
-
-        res.setTestCount( testResult.getTestCount() );
-        res.setTotalTime( testResult.getTotalTime() );
-        return res;
-    }
-
-    private SuiteResult populateSuiteResult( org.apache.maven.continuum.model.scm.SuiteResult
suiteresult )
-    {
-        if ( suiteresult == null )
-        {
-            return null;
-        }
-
-        SuiteResult res = new SuiteResult();
-        res.setFailureCount( suiteresult.getFailureCount() );
-
-        if ( suiteresult.getFailures() != null )
-        {
-            for ( Iterator i = suiteresult.getFailures().iterator(); i.hasNext(); )
-            {
-                org.apache.maven.continuum.model.scm.TestCaseFailure failure =
-                    (org.apache.maven.continuum.model.scm.TestCaseFailure) i.next();
-                res.addFailure( populateTestCaseFailure( failure ) );
-            }
-        }
-
-        res.setName( suiteresult.getName() );
-        res.setTestCount( suiteresult.getTestCount() );
-        res.setTotalTime( suiteresult.getTotalTime() );
-        return res;
-    }
-
-    private TestCaseFailure populateTestCaseFailure( org.apache.maven.continuum.model.scm.TestCaseFailure
failure )
-    {
-        if ( failure == null )
-        {
-            return null;
-        }
-
-        TestCaseFailure res = new TestCaseFailure();
-        res.setException( failure.getException() );
-        res.setName( failure.getName() );
         return res;
     }
 



Mime
View raw message