maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1085000 - in /maven/surefire/trunk: surefire-api/src/main/java/org/apache/maven/surefire/report/ surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/ surefire-providers/common-junit4/src/main/java/org/apa...
Date Thu, 24 Mar 2011 15:33:25 GMT
Author: krosenvold
Date: Thu Mar 24 15:33:24 2011
New Revision: 1085000

URL: http://svn.apache.org/viewvc?rev=1085000&view=rev
Log:
o Renamed to run listener

Renamed implementation class to match interface name
Removed a couple of unused methods

Added:
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultDirectConsoleReporter.java   (with props)
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DirectConsoleReporter.java
      - copied, changed from r1083013, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/RunListener.java   (contents, props changed)
      - copied, changed from r1083013, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ProviderReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetRunListener.java   (contents, props changed)
      - copied, changed from r1083013, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java
Removed:
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ProviderReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java
Modified:
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java
    maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java
    maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/junit4/MockReporter.java
    maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java
    maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java
    maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java
    maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/SurefireTestSet.java
    maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java
    maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4Provider.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/ConfigurationAwareTestNGReporter.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/SynchronizedReporterManager.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java

Added: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultDirectConsoleReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultDirectConsoleReporter.java?rev=1085000&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultDirectConsoleReporter.java (added)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultDirectConsoleReporter.java Thu Mar 24 15:33:24 2011
@@ -0,0 +1,20 @@
+package org.apache.maven.surefire.report;
+
+import java.io.PrintStream;
+
+/**
+ * @author <a href="mailto:kristian@zenior.no">Kristian Rosenvold</a>
+ */
+public class DefaultDirectConsoleReporter
+    implements DirectConsoleReporter
+{
+    private final PrintStream systemOut;
+
+    public DefaultDirectConsoleReporter( PrintStream systemOut ) {
+        this.systemOut = systemOut;
+    }
+
+    public void writeMessage(String message) {
+        systemOut.println(message);
+    }
+}

Propchange: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultDirectConsoleReporter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DirectConsoleReporter.java (from r1083013, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java)
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DirectConsoleReporter.java?p2=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DirectConsoleReporter.java&p1=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java&r1=1083013&r2=1085000&rev=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DirectConsoleReporter.java Thu Mar 24 15:33:24 2011
@@ -19,22 +19,15 @@ package org.apache.maven.surefire.report
  * under the License.
  */
 
-import org.apache.maven.surefire.suite.RunResult;
-
 /**
- * @author Kristian Rosenvold
+ * Allows providers to write console messages on the running maven process.
+ *
+ * This output is associated with the entire test run and not a specific
+ * test, which means it just goes straight to the console immediately.
+ *
+ s* <p/>
  */
-public interface ReporterFactory
+public interface DirectConsoleReporter
 {
-    RunStatistics getGlobalRunStatistics();
-
-    /**
-     * Creates a reporter. The reporter is a singleton that is expected to be
-     * used in the provider.
-     *
-     * @return A reporter instance
-     */
-    ProviderReporter createReporter();
-
-    RunResult close();
+    public void writeMessage( String message );
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java Thu Mar 24 15:33:24 2011
@@ -34,7 +34,15 @@ public interface ReporterFactory
      *
      * @return A reporter instance
      */
-    ProviderReporter createReporter();
+    RunListener createReporter();
+
+    /**
+     * Creates a ConsoleReporter, that allows providers to write messages to the running maven console.
+     * This output is not associated with any thread/test and appears immediately.
+     * @return a ConsoleReporter
+     */
+    DirectConsoleReporter createConsoleReporter();
+
 
     RunResult close();
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java Thu Mar 24 15:33:24 2011
@@ -76,19 +76,19 @@ public class ReporterManagerFactory
         return globalRunStatistics;
     }
 
-    public ProviderReporter createReporter()
+    public RunListener createReporter()
     {
         reports = instantiateReportsNewStyle( reportDefinitions, reporterConfiguration, surefireClassLoader );
         return setupReporter( reports );
     }
 
 
-    private ProviderReporter setupReporter( List reports )
+    private RunListener setupReporter( List reports )
     {
         // Note, if we ever start making >1 reporter Managers, we have to aggregate run statistics
         // i.e. we cannot use a single "globalRunStatistics"
-        final ReporterManager reporterManager =
-            new ReporterManager( reports, globalRunStatistics, systemStreamCapturer );
+        final TestSetRunListener reporterManager =
+            new TestSetRunListener( reports, globalRunStatistics, systemStreamCapturer );
         if ( first == null )
         {
             synchronized ( lock )
@@ -165,6 +165,10 @@ public class ReporterManagerFactory
 
     }
 
+    public DirectConsoleReporter createConsoleReporter() {
+        return new DefaultDirectConsoleReporter(reporterConfiguration.getOriginalSystemOut());
+    }
+
     private void warnIfNoTests()
     {
         if ( getGlobalRunStatistics().getRunResult().getCompletedCount() == 0 )

Copied: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/RunListener.java (from r1083013, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ProviderReporter.java)
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/RunListener.java?p2=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/RunListener.java&p1=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ProviderReporter.java&r1=1083013&r2=1085000&rev=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ProviderReporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/RunListener.java Thu Mar 24 15:33:24 2011
@@ -26,7 +26,7 @@ package org.apache.maven.surefire.report
  * An instance of a reporter is not guaranteed to be thread-safe and concurrent test frameworks
  * must request an instance of a reporter per-thread from the ReporterFactory.
  */
-public interface ProviderReporter
+public interface RunListener
 {
     /**
      * Indicates the start of a given test-set
@@ -87,35 +87,4 @@ public interface ProviderReporter
 
 
     void testSkipped( ReportEntry report );
-
-    /**
-     * Event fired when a test ended with an error (non anticipated problem)
-     *
-     * @param report The report entry to log for
-     * @param stdOut standard output from the test case
-     * @param stdErr error output from the test case
-     * @deprecated remove when building with 2.7.2
-     */
-    void testError( ReportEntry report, String stdOut, String stdErr );
-
-    /**
-     * Event fired when a test ended with a failure (anticipated problem)
-     *
-     * @param report The report entry to log for
-     * @param stdOut standard output from the test case
-     * @param stdErr error output from the test case
-     * @deprecated remove when building with 2.7.2
-     */
-    void testFailed( ReportEntry report, String stdOut, String stdErr );
-
-    /**
-     * Writes a message that will be displayed in all free-text format reporters.
-     * These messages will be output regardless, as opposed to #writeDetailMessage,
-     * which is controlled by reportFormat.
-     *
-     * @param message The message to write.
-     * @deprecated remove when building with 2.7.2
-     */
-    void writeMessage( String message );
-
 }

Propchange: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/RunListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/RunListener.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Copied: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetRunListener.java (from r1083013, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java)
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetRunListener.java?p2=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetRunListener.java&p1=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java&r1=1083013&r2=1085000&rev=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetRunListener.java Thu Mar 24 15:33:24 2011
@@ -23,7 +23,7 @@ import java.util.Iterator;
 import java.util.List;
 
 /**
- * A reporting front-end for providers.
+ * Reports data for a single test set.
  * <p/>
  * Synchronization/Threading note:
  * <p/>
@@ -36,8 +36,8 @@ import java.util.List;
  * preferably removing singleton state approach out of the reporting interface.
  * <p/>
  */
-public class ReporterManager
-    implements ProviderReporter, RunReporter, Reporter
+public class TestSetRunListener
+    implements RunListener, RunReporter, Reporter
 {
     private final RunStatistics runStatisticsForThis;
 
@@ -45,8 +45,8 @@ public class ReporterManager
 
     private final SystemStreamCapturer consoleCapturer;
 
-    public ReporterManager( List reports, RunStatistics runStatisticsForThis,
-                            SystemStreamCapturer systemStreamCapturer )
+    public TestSetRunListener( List reports, RunStatistics runStatisticsForThis,
+                               SystemStreamCapturer systemStreamCapturer )
     {
         this.consoleCapturer = systemStreamCapturer;
         multicastingReporter = new MulticastingReporter( reports );

Propchange: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetRunListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetRunListener.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java (original)
+++ maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java Thu Mar 24 15:33:24 2011
@@ -19,25 +19,24 @@ package org.apache.maven.surefire.common
  * under the License.
  */
 
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.SimpleReportEntry;
 import org.junit.runner.Description;
 import org.junit.runner.notification.Failure;
-import org.junit.runner.notification.RunListener;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 public class JUnit4RunListener
-    extends RunListener
+    extends org.junit.runner.notification.RunListener
 {
     private static final Pattern PARENS = Pattern.compile( "^" + "[^\\(\\)]+" //non-parens
                                                                + "\\((" // then an open-paren (start matching a group)
                                                                + "[^\\\\(\\\\)]+" //non-parens
                                                                + ")\\)" + "$" ); // then a close-paren (end group match)
 
-    protected final ProviderReporter reporter;
+    protected final RunListener reporter;
 
     /**
      * This flag is set after a failure has occurred so that a <code>testSucceeded</code> event is not fired.
@@ -50,7 +49,7 @@ public class JUnit4RunListener
      *
      * @param reporter the reporter to log testing events to
      */
-    public JUnit4RunListener( ProviderReporter reporter )
+    public JUnit4RunListener( RunListener reporter )
     {
         this.reporter = reporter;
     }

Modified: maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/junit4/MockReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/junit4/MockReporter.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/junit4/MockReporter.java (original)
+++ maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/junit4/MockReporter.java Thu Mar 24 15:33:24 2011
@@ -19,7 +19,7 @@ package org.apache.maven.surefire.junit4
  * under the License.
  */
 
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.ReporterConfiguration;
 import org.apache.maven.surefire.report.ReporterException;
@@ -30,7 +30,7 @@ import java.util.concurrent.atomic.Atomi
 
 /** Internal use only */
 public class MockReporter
-    implements ProviderReporter
+    implements RunListener
 {
     private final List<String> events = new ArrayList<String>();
 
@@ -103,28 +103,12 @@ public class MockReporter
 
     }
 
-    public void testError( ReportEntry report, String stdOut, String stdErr )
-    {
-        events.add( TEST_ERROR );
-        testError.incrementAndGet();
-    }
-
-    public void testFailed( ReportEntry report, String stdOut, String stdErr )
-    {
-        events.add( TEST_FAILED );
-        testFailed.incrementAndGet();
-    }
-
     public void testSkipped( ReportEntry report )
     {
         events.add( TEST_SKIPPED );
         testIgnored.incrementAndGet();
     }
 
-    public void writeMessage( String message )
-    {
-    }
-
     public void writeFooter( String footer )
     {
     }

Modified: maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java Thu Mar 24 15:33:24 2011
@@ -23,7 +23,7 @@ import org.apache.maven.surefire.common.
 import org.apache.maven.surefire.common.junit3.JUnit3TestChecker;
 import org.apache.maven.surefire.providerapi.AbstractProvider;
 import org.apache.maven.surefire.providerapi.ProviderParameters;
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterFactory;
@@ -76,7 +76,7 @@ public class JUnit3Provider
 
         ReporterFactory reporterFactory = providerParameters.getReporterFactory();
 
-        ProviderReporter reporter = reporterFactory.createReporter();
+        RunListener reporter = reporterFactory.createReporter();
 
         for ( Iterator iter = testsToRun.iterator(); iter.hasNext(); )
         {
@@ -97,7 +97,7 @@ public class JUnit3Provider
 
     }
 
-    private void executeTestSet( SurefireTestSet testSet, ProviderReporter reporter, ClassLoader classLoader )
+    private void executeTestSet( SurefireTestSet testSet, RunListener reporter, ClassLoader classLoader )
         throws ReporterException, TestSetFailedException
     {
 

Modified: maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java Thu Mar 24 15:33:24 2011
@@ -20,7 +20,7 @@ package org.apache.maven.surefire.junit;
  */
 
 import org.apache.maven.surefire.common.junit3.JUnit3Reflector;
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 
 import java.lang.reflect.InvocationTargetException;
@@ -72,7 +72,7 @@ public final class JUnitTestSet
     }
 
 
-    public void execute( ProviderReporter reporter, ClassLoader loader )
+    public void execute( RunListener reporter, ClassLoader loader )
         throws TestSetFailedException
     {
         Class testClass = getTestClass();

Modified: maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java Thu Mar 24 15:33:24 2011
@@ -20,7 +20,7 @@ package org.apache.maven.surefire.junit;
  */
 
 import org.apache.maven.surefire.report.PojoStackTraceWriter;
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.SimpleReportEntry;
 import org.apache.maven.surefire.testset.TestSetFailedException;
@@ -73,7 +73,7 @@ public class PojoTestSet
         }
     }
 
-    public void execute( ProviderReporter reportManager, ClassLoader loader )
+    public void execute( RunListener reportManager, ClassLoader loader )
         throws TestSetFailedException
     {
         if ( reportManager == null )
@@ -84,7 +84,7 @@ public class PojoTestSet
         executeTestMethods( reportManager );
     }
 
-    private void executeTestMethods( ProviderReporter reportManager )
+    private void executeTestMethods( RunListener reportManager )
     {
         if ( reportManager == null )
         {
@@ -104,7 +104,7 @@ public class PojoTestSet
         }
     }
 
-    private boolean executeTestMethod( Method method, Object[] args, ProviderReporter reportManager )
+    private boolean executeTestMethod( Method method, Object[] args, RunListener reportManager )
     {
         if ( method == null || args == null || reportManager == null )
         {

Modified: maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/SurefireTestSet.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/SurefireTestSet.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/SurefireTestSet.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/SurefireTestSet.java Thu Mar 24 15:33:24 2011
@@ -19,12 +19,12 @@ package org.apache.maven.surefire.junit;
  * under the License.
  */
 
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 
 public interface SurefireTestSet
 {
-    void execute( ProviderReporter reportManager, ClassLoader loader )
+    void execute( RunListener reportManager, ClassLoader loader )
         throws TestSetFailedException;
 
     String getName();

Modified: maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java Thu Mar 24 15:33:24 2011
@@ -19,7 +19,7 @@ package org.apache.maven.surefire.junit;
  * under the License.
  */
 
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.SimpleReportEntry;
 
@@ -43,7 +43,7 @@ public class TestListenerInvocationHandl
 
     private final Set failedTestsSet = new HashSet();
 
-    private ProviderReporter reporter;
+    private RunListener reporter;
 
     private static final Class[] EMPTY_CLASS_ARRAY = new Class[]{ };
 
@@ -103,7 +103,7 @@ public class TestListenerInvocationHandl
         }
     }
 
-    public TestListenerInvocationHandler( ProviderReporter reporter )
+    public TestListenerInvocationHandler( RunListener reporter )
     {
         if ( reporter == null )
         {

Modified: maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4Provider.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4Provider.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4Provider.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4Provider.java Thu Mar 24 15:33:24 2011
@@ -26,7 +26,7 @@ import org.apache.maven.surefire.common.
 import org.apache.maven.surefire.providerapi.AbstractProvider;
 import org.apache.maven.surefire.providerapi.ProviderParameters;
 import org.apache.maven.surefire.report.PojoStackTraceWriter;
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterFactory;
@@ -36,7 +36,7 @@ import org.apache.maven.surefire.testset
 import org.apache.maven.surefire.util.DefaultDirectoryScanner;
 import org.apache.maven.surefire.util.DirectoryScanner;
 import org.apache.maven.surefire.util.TestsToRun;
-import org.junit.runner.notification.RunListener;
+
 import org.junit.runner.notification.RunNotifier;
 
 import java.util.Iterator;
@@ -57,7 +57,7 @@ public class JUnit4Provider extends Abst
 
     private final DirectoryScanner directoryScanner;
 
-    private final List<RunListener> customRunListeners;
+    private final List<org.junit.runner.notification.RunListener> customRunListeners;
 
     private final JUnit4TestChecker jUnit4TestChecker;
     
@@ -92,7 +92,7 @@ public class JUnit4Provider extends Abst
 
         final ReporterFactory reporterFactory = providerParameters.getReporterFactory();
 
-        ProviderReporter reporter = reporterFactory.createReporter();
+        RunListener reporter = reporterFactory.createReporter();
         JUnit4RunListener jUnit4TestSetReporter = new JUnit4RunListener( reporter );
         RunNotifier runNotifer = getRunNotifer( jUnit4TestSetReporter, customRunListeners );
 
@@ -107,7 +107,7 @@ public class JUnit4Provider extends Abst
 
     }
 
-    private void executeTestSet( Class clazz, ProviderReporter reporter, ClassLoader classLoader, RunNotifier listeners )
+    private void executeTestSet( Class clazz, RunListener reporter, ClassLoader classLoader, RunNotifier listeners )
         throws ReporterException, TestSetFailedException
     {
         final ReportEntry report = new SimpleReportEntry( this.getClass().getName(), clazz.getName() );
@@ -134,11 +134,11 @@ public class JUnit4Provider extends Abst
         }
     }
 
-    private RunNotifier getRunNotifer( RunListener main, List<RunListener> others )
+    private RunNotifier getRunNotifer( org.junit.runner.notification.RunListener main, List<org.junit.runner.notification.RunListener> others )
     {
         RunNotifier fNotifier = new RunNotifier();
         fNotifier.addListener( main );
-        for ( RunListener listener : others )
+        for ( org.junit.runner.notification.RunListener listener : others )
         {
             fNotifier.addListener( listener );
         }
@@ -147,11 +147,11 @@ public class JUnit4Provider extends Abst
 
     // I am not entierly sure as to why we do this explicit freeing, it's one of those
     // pieces of code that just seem to linger on in here ;)
-    private void closeRunNotifer( RunListener main, List<RunListener> others )
+    private void closeRunNotifer( org.junit.runner.notification.RunListener main, List<org.junit.runner.notification.RunListener> others )
     {
         RunNotifier fNotifier = new RunNotifier();
         fNotifier.removeListener( main );
-        for ( RunListener listener : others )
+        for ( org.junit.runner.notification.RunListener listener : others )
         {
             fNotifier.removeListener( listener );
         }

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java Thu Mar 24 15:33:24 2011
@@ -19,7 +19,7 @@ package org.apache.maven.surefire.junitc
  * under the License.
  */
 
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.ReporterConfiguration;
 import org.apache.maven.surefire.report.ReporterException;
@@ -33,13 +33,13 @@ import java.util.Map;
  * @author Kristian Rosenvold
  */
 public abstract class ConcurrentReporterManager
-    implements ProviderReporter
+    implements RunListener
 {
     private final Map<String, TestSet> classMethodCounts;
 
     private final ReporterConfiguration reporterConfiguration;
 
-    private final ThreadLocal<ProviderReporter> reporterManagerThreadLocal = new ThreadLocal<ProviderReporter>();
+    private final ThreadLocal<RunListener> reporterManagerThreadLocal = new ThreadLocal<RunListener>();
 
     private final boolean reportImmediately;
 
@@ -142,21 +142,6 @@ public abstract class ConcurrentReporter
 
     protected abstract void checkIfTestSetCanBeReported( TestSet testSetForTest );
 
-    public void writeMessage( String message )
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public void testFailed( ReportEntry report, String stdOut, String stdErr )
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public void testError( ReportEntry failure, String out, String err )
-    {
-        throw new UnsupportedOperationException();
-    }
-
     TestMethod getTestMethod()
     {
         return TestMethod.getThreadTestMethod();
@@ -172,9 +157,9 @@ public abstract class ConcurrentReporter
         return classMethodCounts.get( description.getSourceName() );
     }
 
-    ProviderReporter getReporterManager()
+    RunListener getReporterManager()
     {
-        ProviderReporter reporterManager = reporterManagerThreadLocal.get();
+        RunListener reporterManager = reporterManagerThreadLocal.get();
         if ( reporterManager == null )
         {
             reporterManager = reporterFactory.createReporter();

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java Thu Mar 24 15:33:24 2011
@@ -23,7 +23,7 @@ import org.apache.maven.surefire.common.
 import org.apache.maven.surefire.common.junit4.JUnit4TestChecker;
 import org.apache.maven.surefire.providerapi.AbstractProvider;
 import org.apache.maven.surefire.providerapi.ProviderParameters;
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReporterConfiguration;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterFactory;
@@ -32,7 +32,6 @@ import org.apache.maven.surefire.testset
 import org.apache.maven.surefire.util.DirectoryScanner;
 import org.apache.maven.surefire.util.ScannerFilter;
 import org.apache.maven.surefire.util.TestsToRun;
-import org.junit.runner.notification.RunListener;
 
 import java.util.Iterator;
 import java.util.List;
@@ -54,7 +53,7 @@ public class JUnitCoreProvider
 
     private final ScannerFilter scannerFilter;
 
-    private final List<RunListener> customRunListeners;
+    private final List<org.junit.runner.notification.RunListener> customRunListeners;
 
     private final ProviderParameters providerParameters;
 
@@ -92,7 +91,7 @@ public class JUnitCoreProvider
         final String message = "Concurrency config is " + jUnitCoreParameters.toString();
         final ReporterFactory reporterFactory = providerParameters.getReporterFactory();
 
-        reporterFactory.createReporter().writeMessage( message );
+        reporterFactory.createConsoleReporter().writeMessage( message );
 
         if ( testsToRun == null )
         {
@@ -100,11 +99,11 @@ public class JUnitCoreProvider
         }
         final Map<String, TestSet> testSetMap = new ConcurrentHashMap<String, TestSet>();
 
-        ProviderReporter listener =
+        RunListener listener =
             ConcurrentReporterManager.createInstance( testSetMap, reporterFactory, this.reporterConfiguration,
                                                       jUnitCoreParameters.isParallelClasses(),
                                                       jUnitCoreParameters.isParallelBoth() );
-        RunListener jUnit4RunListener = new JUnitCoreRunListener( listener, testSetMap );
+        org.junit.runner.notification.RunListener jUnit4RunListener = new JUnitCoreRunListener( listener, testSetMap );
         customRunListeners.add( 0, jUnit4RunListener );
 
         JUnitCoreWrapper.execute( testsToRun, jUnitCoreParameters, customRunListeners );

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java Thu Mar 24 15:33:24 2011
@@ -20,7 +20,7 @@ package org.apache.maven.surefire.junitc
  */
 
 import org.apache.maven.surefire.common.junit4.JUnit4RunListener;
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 
 import java.util.ArrayList;
 import java.util.Map;
@@ -37,7 +37,7 @@ public class JUnitCoreRunListener
      * @param reporter          the report manager to log testing events to
      * @param classMethodCounts A map of methods
      */
-    public JUnitCoreRunListener( ProviderReporter reporter, Map<String, TestSet> classMethodCounts )
+    public JUnitCoreRunListener( RunListener reporter, Map<String, TestSet> classMethodCounts )
     {
         super( reporter );
         this.classMethodCounts = classMethodCounts;

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java Thu Mar 24 15:33:24 2011
@@ -19,7 +19,7 @@ package org.apache.maven.surefire.junitc
  * under the License.
  */
 
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.Reporter;
 import org.apache.maven.surefire.report.SimpleReportEntry;
@@ -61,7 +61,7 @@ public class TestSet
         this.testSetDescription = testSetDescription;
     }
 
-    public void replay( ProviderReporter target )
+    public void replay( RunListener target )
     {
         if ( !played.compareAndSet( false, true ) )
         {
@@ -118,7 +118,7 @@ public class TestSet
         testMethods.add( testMethod );
     }
 
-    public void incrementFinishedTests( ProviderReporter reporterManager, boolean reportImmediately )
+    public void incrementFinishedTests( RunListener reporterManager, boolean reportImmediately )
     {
         numberOfCompletedChildren.incrementAndGet();
         if ( allScheduled.get() && isAllTestsDone() && reportImmediately )
@@ -127,7 +127,7 @@ public class TestSet
         }
     }
 
-    public void setAllScheduled( ProviderReporter reporterManager )
+    public void setAllScheduled( RunListener reporterManager )
     {
         allScheduled.set( true );
         if ( isAllTestsDone() )

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java Thu Mar 24 15:33:24 2011
@@ -24,7 +24,7 @@ import junit.framework.Assert;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import org.apache.maven.surefire.report.ConsoleReporter;
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReporterConfiguration;
 import org.apache.maven.surefire.report.ReporterFactory;
 import org.apache.maven.surefire.report.ReporterManagerFactory;
@@ -34,7 +34,6 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.Computer;
 import org.junit.runner.JUnitCore;
-import org.junit.runner.notification.RunListener;
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
@@ -157,7 +156,7 @@ public class ConcurrentReporterManagerTe
     {
         ReporterFactory reporterFactory = createReporterFactory();
         HashMap<String, TestSet> classMethodCounts = new HashMap<String, TestSet>();
-        ProviderReporter reporter =
+        RunListener reporter =
             new ClassesParallelRunListener( classMethodCounts, reporterFactory, getReporterConfiguration() );
         JUnitCoreRunListener runListener = new JUnitCoreRunListener( reporter, classMethodCounts );
         RunStatistics result = runClasses( reporterFactory, runListener, classes );
@@ -177,7 +176,7 @@ public class ConcurrentReporterManagerTe
     {
         HashMap<String, TestSet> classMethodCounts = new HashMap<String, TestSet>();
         final ReporterFactory reporterManagerFactory = createReporterFactory();
-        RunListener demultiplexingRunListener = createRunListener( reporterManagerFactory, classMethodCounts );
+        org.junit.runner.notification.RunListener demultiplexingRunListener = createRunListener( reporterManagerFactory, classMethodCounts );
 
         JUnitCore jUnitCore = new JUnitCore();
 
@@ -189,7 +188,7 @@ public class ConcurrentReporterManagerTe
         return reporterManagerFactory.getGlobalRunStatistics();
     }
 
-    private RunStatistics runClasses( ReporterFactory reporterManagerFactory, RunListener demultiplexingRunListener,
+    private RunStatistics runClasses( ReporterFactory reporterManagerFactory, org.junit.runner.notification.RunListener demultiplexingRunListener,
                                       Class... classes )
         throws TestSetFailedException
     {
@@ -203,7 +202,7 @@ public class ConcurrentReporterManagerTe
         return reporterManagerFactory.getGlobalRunStatistics();
     }
 
-    private RunListener createRunListener( ReporterFactory reporterFactory, Map<String, TestSet> testSetMap )
+    private org.junit.runner.notification.RunListener createRunListener( ReporterFactory reporterFactory, Map<String, TestSet> testSetMap )
         throws TestSetFailedException
     {
         return new JUnitCoreRunListener(

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java Thu Mar 24 15:33:24 2011
@@ -17,7 +17,7 @@
 package org.apache.maven.surefire.junitcore;
 
 import junit.framework.TestCase;
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReporterConfiguration;
 import org.apache.maven.surefire.report.ReporterFactory;
 import org.apache.maven.surefire.report.ReporterManagerFactory;
@@ -33,7 +33,6 @@ import org.junit.runner.Computer;
 import org.junit.runner.JUnitCore;
 import org.junit.runner.Result;
 import org.junit.runner.notification.Failure;
-import org.junit.runner.notification.RunListener;
 
 /**
  * TestCase that expose "No tests were executed!" on Test failure using Maven Surefire 2.6-SNAPSHOT
@@ -124,10 +123,10 @@ public class MavenSurefireJUnit47RunnerT
             new ReporterManagerFactory( this.getClass().getClassLoader(), reporterConfiguration );
 
         final HashMap<String, TestSet> classMethodCounts = new HashMap<String, TestSet>();
-        ProviderReporter reporter = ConcurrentReporterManager.createInstance( classMethodCounts, reporterManagerFactory,
+        RunListener reporter = ConcurrentReporterManager.createInstance( classMethodCounts, reporterManagerFactory,
                                                                       getReporterConfiguration(), false, false );
 
-        RunListener concurrentReportingRunListener = new JUnitCoreRunListener( reporter, classMethodCounts );
+        org.junit.runner.notification.RunListener concurrentReportingRunListener = new JUnitCoreRunListener( reporter, classMethodCounts );
         Computer computer = new Computer();
 
         JUnitCore junitCore = new JUnitCore();

Modified: maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/ConfigurationAwareTestNGReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/ConfigurationAwareTestNGReporter.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/ConfigurationAwareTestNGReporter.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/ConfigurationAwareTestNGReporter.java Thu Mar 24 15:33:24 2011
@@ -20,7 +20,7 @@ package org.apache.maven.surefire.testng
  */
 
 
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 
 import org.testng.internal.IResultListener;
 
@@ -35,7 +35,7 @@ public class ConfigurationAwareTestNGRep
     implements IResultListener
 {
 
-    public ConfigurationAwareTestNGReporter( ProviderReporter reportManager, TestNgTestSuite source )
+    public ConfigurationAwareTestNGReporter( RunListener reportManager, TestNgTestSuite source )
     {
         super( reportManager );
     }

Modified: maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/SynchronizedReporterManager.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/SynchronizedReporterManager.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/SynchronizedReporterManager.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/SynchronizedReporterManager.java Thu Mar 24 15:33:24 2011
@@ -20,7 +20,7 @@ package org.apache.maven.surefire.testng
  */
 
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReporterException;
 
 /**
@@ -57,12 +57,12 @@ import org.apache.maven.surefire.report.
  * @noinspection deprecation
  */
 class SynchronizedReporterManager
-    implements ProviderReporter
+    implements RunListener
 {
 
-    private final ProviderReporter target;
+    private final RunListener target;
 
-    public SynchronizedReporterManager( ProviderReporter target )
+    public SynchronizedReporterManager( RunListener target )
     {
         this.target = target;
     }
@@ -89,26 +89,11 @@ class SynchronizedReporterManager
         target.testSucceeded( report );
     }
 
-    public synchronized void testError( ReportEntry report, String stdOut, String stdErr )
-    {
-        target.testError( report, stdOut, stdErr );
-    }
-
-    public synchronized void testFailed( ReportEntry report, String stdOut, String stdErr )
-    {
-        target.testFailed( report, stdOut, stdErr );
-    }
-
     public synchronized void testSkipped( ReportEntry report )
     {
         target.testSkipped( report );
     }
 
-    public synchronized void writeMessage( String message )
-    {
-        target.writeMessage( message );
-    }
-
 
     public synchronized void testError( ReportEntry reportEntry )
     {

Modified: maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java Thu Mar 24 15:33:24 2011
@@ -22,7 +22,7 @@ package org.apache.maven.surefire.testng
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
 import org.apache.maven.surefire.NonAbstractClassFilter;
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterFactory;
@@ -96,7 +96,7 @@ public class TestNGDirectoryTestSuite
             return;
         }
 
-        ProviderReporter reporter = reporterManagerFactory.createReporter();
+        RunListener reporter = reporterManagerFactory.createReporter();
         startTestSuite( reporter, this );
 
         TestNGExecutor.run( new Class[]{ (Class) testsToRun.iterator().next() }, this.testSourceDirectory, this.options,
@@ -141,7 +141,7 @@ public class TestNGDirectoryTestSuite
             junitReportsDirectory = new File( reportsDirectory, "testng-junit-results" );
         }
 
-        ProviderReporter reporterManager = new SynchronizedReporterManager( reporterFactory.createReporter() );
+        RunListener reporterManager = new SynchronizedReporterManager( reporterFactory.createReporter() );
         startTestSuite( reporterManager, this );
 
         Class[] testClasses = (Class[]) testNgTestClasses.toArray( new Class[testNgTestClasses.size()] );
@@ -184,7 +184,7 @@ public class TestNGDirectoryTestSuite
             throw new TestSetFailedException( "Unable to find test set '" + testSetName + "' in suite" );
         }
 
-        ProviderReporter reporter = reporterManagerFactory.createReporter();
+        RunListener reporter = reporterManagerFactory.createReporter();
         startTestSuite( reporter, this );
 
         TestNGExecutor.run( new Class[]{ testSet.getTestClass() }, this.testSourceDirectory, this.options, this.version,
@@ -193,7 +193,7 @@ public class TestNGDirectoryTestSuite
         finishTestSuite( reporter, this );
     }
 
-    public static void startTestSuite( ProviderReporter reporter, Object suite )
+    public static void startTestSuite( RunListener reporter, Object suite )
     {
         ReportEntry report = new SimpleReportEntry( suite.getClass().getName(), getSuiteName( suite ) );
 
@@ -207,7 +207,7 @@ public class TestNGDirectoryTestSuite
         }
     }
 
-    public static void finishTestSuite( ProviderReporter reporterManager, Object suite )
+    public static void finishTestSuite( RunListener reporterManager, Object suite )
         throws ReporterException
     {
         ReportEntry report = new SimpleReportEntry( suite.getClass().getName(), getSuiteName( suite ) );

Modified: maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java Thu Mar 24 15:33:24 2011
@@ -29,7 +29,7 @@ import java.util.Map;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.artifact.versioning.VersionRange;
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.testng.conf.Configurator;
 import org.apache.maven.surefire.testng.conf.TestNG4751Configurator;
 import org.apache.maven.surefire.testng.conf.TestNG52Configurator;
@@ -55,7 +55,7 @@ public class TestNGExecutor
     }
 
     public static void run( Class[] testClasses, String testSourceDirectory, Map options, ArtifactVersion version,
-                            ProviderReporter reportManager, TestNgTestSuite suite, File reportsDirectory, final String methodNamePattern )
+                            RunListener reportManager, TestNgTestSuite suite, File reportsDirectory, final String methodNamePattern )
         throws TestSetFailedException
     {
         TestNG testng = new TestNG( true );
@@ -111,7 +111,7 @@ public class TestNGExecutor
     }
     
     public static void run( List suiteFiles, String testSourceDirectory, Map options, ArtifactVersion version,
-                            ProviderReporter reportManager, TestNgTestSuite suite, File reportsDirectory )
+                            RunListener reportManager, TestNgTestSuite suite, File reportsDirectory )
         throws TestSetFailedException
     {
         TestNG testng = new TestNG( true );
@@ -152,7 +152,7 @@ public class TestNGExecutor
     }
 
 
-    private static void postConfigure( TestNG testNG, String sourcePath, ProviderReporter reportManager, TestNgTestSuite suite,
+    private static void postConfigure( TestNG testNG, String sourcePath, RunListener reportManager, TestNgTestSuite suite,
                                        File reportsDirectory )
         throws TestSetFailedException
     {
@@ -173,7 +173,7 @@ public class TestNGExecutor
 
     // If we have access to IResultListener, return a ConfigurationAwareTestNGReporter
     // But don't cause NoClassDefFoundErrors if it isn't available; just return a regular TestNGReporter instead
-    private static TestNGReporter createTestNGReporter( ProviderReporter reportManager, TestNgTestSuite suite )
+    private static TestNGReporter createTestNGReporter( RunListener reportManager, TestNgTestSuite suite )
     {
         try
         {
@@ -181,7 +181,7 @@ public class TestNGExecutor
             Class c = Class.forName( "org.apache.maven.surefire.testng.ConfigurationAwareTestNGReporter" );
             try
             {
-                Constructor ctor = c.getConstructor( new Class[]{ ProviderReporter.class, TestNgTestSuite.class } );
+                Constructor ctor = c.getConstructor( new Class[]{ RunListener.class, TestNgTestSuite.class } );
                 return (TestNGReporter) ctor.newInstance( new Object[]{ reportManager, suite } );
             }
             catch ( Exception e )

Modified: maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java Thu Mar 24 15:33:24 2011
@@ -23,7 +23,7 @@ import org.apache.maven.surefire.Surefir
 import org.apache.maven.surefire.report.CategorizedReportEntry;
 import org.apache.maven.surefire.report.PojoStackTraceWriter;
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.SimpleReportEntry;
 
 import java.util.ResourceBundle;
@@ -38,7 +38,7 @@ import org.testng.TestNG;
 /**
  * Listens for and provides and adaptor layer so that
  * TestNG tests can report their status to the current
- * {@link org.apache.maven.surefire.report.ProviderReporter}.
+ * {@link org.apache.maven.surefire.report.RunListener}.
  *
  * @author jkuhnert
  * @noinspection ThrowableResultOfMethodCallIgnored
@@ -51,7 +51,7 @@ public class TestNGReporter
     /**
      * core Surefire reporting
      */
-    private final ProviderReporter reporter;
+    private final RunListener reporter;
 
     /**
      * Constructs a new instance that will listen to
@@ -63,7 +63,7 @@ public class TestNGReporter
      *
      * @param reportManager Instance to report suite status to
      */
-    public TestNGReporter( ProviderReporter reportManager )
+    public TestNGReporter( RunListener reportManager )
     {
         this.reporter = reportManager;
 

Modified: maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java?rev=1085000&r1=1084999&r2=1085000&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java Thu Mar 24 15:33:24 2011
@@ -21,7 +21,7 @@ package org.apache.maven.surefire.testng
 
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
-import org.apache.maven.surefire.report.ProviderReporter;
+import org.apache.maven.surefire.report.RunListener;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterManagerFactory;
 import org.apache.maven.surefire.testset.TestSetFailedException;
@@ -83,7 +83,7 @@ public class TestNGXmlTestSuite
         {
             throw new IllegalStateException( "You must call locateTestSets before calling execute" );
         }
-        ProviderReporter reporter = new SynchronizedReporterManager( reporterManagerFactory.createReporter() );
+        RunListener reporter = new SynchronizedReporterManager( reporterManagerFactory.createReporter() );
         TestNGDirectoryTestSuite.startTestSuite( reporter, this );
         TestNGExecutor.run( this.suiteFilePaths, this.testSourceDirectory, this.options, this.version, reporter,
                             this, reportsDirectory );



Mime
View raw message