You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2014/10/29 23:12:23 UTC

git commit: [SUREFIRE-1108] Surefire should print parallel tests in progress been stopped after elapsed timeout

Repository: maven-surefire
Updated Branches:
  refs/heads/master e156ab812 -> 06200e077


[SUREFIRE-1108] Surefire should print parallel tests in progress been stopped after elapsed timeout


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/06200e07
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/06200e07
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/06200e07

Branch: refs/heads/master
Commit: 06200e077db1ebb0ac99c937532c77af8e3778aa
Parents: e156ab8
Author: tibordigana <ti...@lycos.com>
Authored: Wed Oct 29 22:56:44 2014 +0100
Committer: tibordigana <ti...@lycos.com>
Committed: Wed Oct 29 22:56:44 2014 +0100

----------------------------------------------------------------------
 .../maven/surefire/its/JUnit47ParallelIT.java   | 11 ++++
 .../surefire/junitcore/AsynchronousRunner.java  |  4 ++
 .../junitcore/ConfigurableParallelComputer.java |  4 ++
 .../surefire/junitcore/SynchronousRunner.java   |  4 ++
 .../surefire/junitcore/pc/ParallelComputer.java | 54 +++++++++++++------
 .../junitcore/pc/ParallelComputerBuilder.java   | 10 ++--
 .../maven/surefire/junitcore/pc/Scheduler.java  | 42 ++++++++++-----
 .../surefire/junitcore/pc/ShutdownResult.java   | 57 ++++++++++++++++++++
 .../surefire/junitcore/pc/ShutdownStatus.java   | 23 ++++----
 .../junitcore/pc/SingleThreadScheduler.java     | 16 ++++--
 .../pc/ParallelComputerBuilderTest.java         |  2 +-
 11 files changed, 174 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/06200e07/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit47ParallelIT.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit47ParallelIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit47ParallelIT.java
index 921ba73..d2d0098 100644
--- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit47ParallelIT.java
+++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit47ParallelIT.java
@@ -521,6 +521,17 @@ public class JUnit47ParallelIT
             "The test run has finished abruptly after timeout of 1.0 seconds." );
     }
 
+    @Test
+    public void forcedShutdownVerifyingLogs()
+    {
+        // executes for 2.5 sec until timeout has elapsed
+        unpack().parallelMethods().threadCountMethods( 3 ).disablePerCoreThreadCount()
+            .parallelTestsTimeoutForcedInSeconds( 1.05d ).setTestToRun( "Waiting*Test" ).failNever().executeTest()
+            .verifyTextInLog( "The test run has finished abruptly after timeout of 1.05 seconds." )
+            .verifyTextInLog( "These tests were executed in prior to the shutdown operation:" )
+            .verifyTextInLog( "These tests are incomplete:" );
+    }
+
     private SurefireLauncher unpack()
     {
         return unpack( "junit47-parallel" );

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/06200e07/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/AsynchronousRunner.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/AsynchronousRunner.java b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/AsynchronousRunner.java
index dcadeff..8faa12e 100644
--- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/AsynchronousRunner.java
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/AsynchronousRunner.java
@@ -30,8 +30,12 @@ import java.util.concurrent.Future;
 import org.junit.runners.model.RunnerScheduler;
 
 /**
+ * Since SUREFIRE 2.18 this class is deprecated.
+ * Please use {@link org.apache.maven.surefire.junitcore.pc.ParallelComputerBuilder} instead.
+ *
  * @author <a href="mailto:kristian@zenior.no">Kristian Rosenvold</a>
  */
+@Deprecated
 public class AsynchronousRunner
     implements RunnerScheduler
 {

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/06200e07/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConfigurableParallelComputer.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConfigurableParallelComputer.java b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConfigurableParallelComputer.java
index a4a5414..d664edc 100644
--- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConfigurableParallelComputer.java
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConfigurableParallelComputer.java
@@ -35,8 +35,12 @@ import org.junit.runners.model.RunnerBuilder;
 import org.junit.runners.model.RunnerScheduler;
 
 /**
+ * Since SUREFIRE 2.18 this class is deprecated.
+ * Please use {@link org.apache.maven.surefire.junitcore.pc.ParallelComputerBuilder} instead.
+ *
  * @author Kristian Rosenvold
  */
+@Deprecated
 public class ConfigurableParallelComputer
     extends Computer
 {

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/06200e07/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/SynchronousRunner.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/SynchronousRunner.java b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/SynchronousRunner.java
index 665bcb7..efbca98 100644
--- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/SynchronousRunner.java
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/SynchronousRunner.java
@@ -22,8 +22,12 @@ package org.apache.maven.surefire.junitcore;
 import org.junit.runners.model.RunnerScheduler;
 
 /**
+ * Since SUREFIRE 2.18 this class is deprecated.
+ * Please use {@link org.apache.maven.surefire.junitcore.pc.ParallelComputerBuilder} instead.
+ *
  * @author <a href="mailto:kristian@zenior.no">Kristian Rosenvold</a>
  */
+@Deprecated
 class SynchronousRunner
     implements RunnerScheduler
 {

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/06200e07/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ParallelComputer.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ParallelComputer.java b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ParallelComputer.java
index 86c958f..5491a68 100644
--- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ParallelComputer.java
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ParallelComputer.java
@@ -61,7 +61,8 @@ public abstract class ParallelComputer
         this.timeoutForcedNanos = secondsToNanos( timeoutForcedInSeconds );
     }
 
-    protected abstract Collection<Description> describeStopped( boolean shutdownNow );
+    protected abstract ShutdownResult describeStopped( boolean shutdownNow );
+
     abstract boolean shutdownThreadPoolsAwaitingKilled();
 
     protected final void beforeRunQuietly()
@@ -111,15 +112,17 @@ public abstract class ParallelComputer
             try
             {
                 final TreeSet<String> executedTests = new TreeSet<String>();
+                final TreeSet<String> incompleteTests = new TreeSet<String>();
 
                 if ( isShutdownTimeout )
                 {
-                    printShutdownHook( executedTests, shutdownStatus.getDescriptionsBeforeShutdown() );
+                    printShutdownHook( executedTests, incompleteTests, shutdownStatus.getDescriptionsBeforeShutdown() );
                 }
 
                 if ( isForcedShutdownTimeout )
                 {
-                    printShutdownHook( executedTests, forcedShutdownStatus.getDescriptionsBeforeShutdown() );
+                    printShutdownHook( executedTests, incompleteTests,
+                                       forcedShutdownStatus.getDescriptionsBeforeShutdown() );
                 }
 
                 if ( !executedTests.isEmpty() )
@@ -130,6 +133,15 @@ public abstract class ParallelComputer
                         msg.append( executedTest ).append( '\n' );
                     }
                 }
+
+                if ( !incompleteTests.isEmpty() )
+                {
+                    msg.append( "These tests are incomplete:\n" );
+                    for ( String incompleteTest : incompleteTests )
+                    {
+                        msg.append( incompleteTest ).append( '\n' );
+                    }
+                }
             }
             catch ( InterruptedException e )
             {
@@ -143,12 +155,12 @@ public abstract class ParallelComputer
         return msg.toString();
     }
 
-    private Future<Collection<Description>> scheduleShutdown()
+    private Future<ShutdownResult> scheduleShutdown()
     {
         return getShutdownScheduler().schedule( createShutdownTask(), timeoutNanos, NANOSECONDS );
     }
 
-    private Future<Collection<Description>> scheduleForcedShutdown()
+    private Future<ShutdownResult> scheduleForcedShutdown()
     {
         return getShutdownScheduler().schedule( createForcedShutdownTask(), timeoutForcedNanos, NANOSECONDS );
     }
@@ -162,11 +174,11 @@ public abstract class ParallelComputer
         return shutdownScheduler;
     }
 
-    private Callable<Collection<Description>> createShutdownTask()
+    private Callable<ShutdownResult> createShutdownTask()
     {
-        return new Callable<Collection<Description>>()
+        return new Callable<ShutdownResult>()
         {
-            public Collection<Description> call()
+            public ShutdownResult call()
                 throws Exception
             {
                 boolean stampedStatusWithTimeout = ParallelComputer.this.shutdownStatus.tryTimeout();
@@ -175,11 +187,11 @@ public abstract class ParallelComputer
         };
     }
 
-    private Callable<Collection<Description>> createForcedShutdownTask()
+    private Callable<ShutdownResult> createForcedShutdownTask()
     {
-        return new Callable<Collection<Description>>()
+        return new Callable<ShutdownResult>()
         {
-            public Collection<Description> call()
+            public ShutdownResult call()
                 throws Exception
             {
                 boolean stampedStatusWithTimeout = ParallelComputer.this.forcedShutdownStatus.tryTimeout();
@@ -225,19 +237,27 @@ public abstract class ParallelComputer
         }
     }
 
-    private static void printShutdownHook( Collection<String> executedTests,
-                                           Future<Collection<Description>> testsBeforeShutdown )
+    private static void printShutdownHook( Collection<String> executedTests, Collection<String> incompleteTests,
+                                           Future<ShutdownResult> testsBeforeShutdown )
         throws ExecutionException, InterruptedException
     {
         if ( testsBeforeShutdown != null )
         {
-            for ( final Description executedTest : testsBeforeShutdown.get() )
+            for ( final Description test : testsBeforeShutdown.get().getTriggeredTests() )
+            {
+                if ( test != null && test.getDisplayName() != null )
+                {
+                    executedTests.add( test.getDisplayName() );
+                }
+            }
+
+            for ( final Description test : testsBeforeShutdown.get().getIncompleteTests() )
             {
-                if ( executedTest != null && executedTest.getDisplayName() != null )
+                if ( test != null && test.getDisplayName() != null )
                 {
-                    executedTests.add( executedTest.getDisplayName() );
+                    incompleteTests.add( test.getDisplayName() );
                 }
             }
         }
     }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/06200e07/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ParallelComputerBuilder.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ParallelComputerBuilder.java b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ParallelComputerBuilder.java
index d18edd7..dd120f9 100644
--- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ParallelComputerBuilder.java
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ParallelComputerBuilder.java
@@ -257,15 +257,17 @@ public final class ParallelComputerBuilder
         }
 
         @Override
-        protected Collection<Description> describeStopped( boolean shutdownNow )
+        protected ShutdownResult describeStopped( boolean shutdownNow )
         {
-            Collection<Description> startedTests = notThreadSafeTests.describeStopped( shutdownNow );
+            ShutdownResult shutdownResult = notThreadSafeTests.describeStopped( shutdownNow );
             final Scheduler m = master;
             if ( m != null )
             {
-                startedTests.addAll( m.describeStopped( shutdownNow ) );
+                ShutdownResult shutdownResultOfMaster = m.describeStopped( shutdownNow );
+                shutdownResult.getTriggeredTests().addAll( shutdownResultOfMaster.getTriggeredTests() );
+                shutdownResult.getIncompleteTests().addAll( shutdownResultOfMaster.getIncompleteTests() );
             }
-            return startedTests;
+            return shutdownResult;
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/06200e07/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/Scheduler.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/Scheduler.java b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/Scheduler.java
index 8feeb02..79f6bd9 100644
--- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/Scheduler.java
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/Scheduler.java
@@ -61,6 +61,8 @@ public class Scheduler
 
     private volatile boolean started = false;
 
+    private volatile boolean finished = false;
+
     private volatile Controller masterController;
 
     /**
@@ -212,17 +214,19 @@ public class Scheduler
      * @param stopNow if <tt>true</tt> interrupts waiting test methods
      * @return collection of descriptions started before shutting down
      */
-    protected Collection<Description> describeStopped( boolean stopNow )
+    protected ShutdownResult describeStopped( boolean stopNow )
     {
         Collection<Description> executedTests = new ConcurrentLinkedQueue<Description>();
-        stop( executedTests, false, stopNow );
-        return executedTests;
+        Collection<Description> incompleteTests = new ConcurrentLinkedQueue<Description>();
+        stop( executedTests, incompleteTests, false, stopNow );
+        return new ShutdownResult( executedTests, incompleteTests );
     }
 
     /**
      * Stop/Shutdown/Interrupt scheduler and its children (if any).
      *
      * @param executedTests       Started tests which have finished normally or abruptly till called this method.
+     * @param incompleteTests     Started tests which have finished incomplete due to shutdown.
      * @param tryCancelFutures    Useful to set to {@code false} if a timeout is specified in plugin config.
      *                            When the runner of
      *                            {@link ParallelComputer#getSuite(org.junit.runners.model.RunnerBuilder, Class[])}
@@ -234,19 +238,28 @@ public class Scheduler
      *                            {@link java.util.concurrent.Future#cancel(boolean) Future#cancel(true)} or
      *                            {@link Thread#interrupt()}.
      */
-    private void stop( Collection<Description> executedTests, boolean tryCancelFutures, boolean stopNow )
+    private void stop( Collection<Description> executedTests, Collection<Description> incompleteTests,
+                       boolean tryCancelFutures, boolean stopNow )
     {
         shutdown = true;
         try
         {
-            if ( executedTests != null && started && !UNUSED_DESCRIPTIONS.contains( description ) )
+            if ( started && !UNUSED_DESCRIPTIONS.contains( description ) )
             {
-                executedTests.add( description );
+                if ( executedTests != null )
+                {
+                    executedTests.add( description );
+                }
+
+                if ( incompleteTests != null && !finished )
+                {
+                    incompleteTests.add( description );
+                }
             }
 
             for ( Controller slave : slaves )
             {
-                slave.stop( executedTests, tryCancelFutures, stopNow );
+                slave.stop( executedTests, incompleteTests, tryCancelFutures, stopNow );
             }
         }
         finally
@@ -277,7 +290,7 @@ public class Scheduler
     {
         if ( masterController == null )
         {
-            stop( null, true, false );
+            stop( null, null, true, false );
             boolean isNotInterrupted = true;
             if ( strategy != null )
             {
@@ -323,7 +336,7 @@ public class Scheduler
             }
             catch ( RejectedExecutionException e )
             {
-                stop( null, true, false );
+                stop( null, null, true, false );
             }
             catch ( Throwable t )
             {
@@ -343,6 +356,10 @@ public class Scheduler
         {
             logQuietly( e );
         }
+        finally
+        {
+            finished = true;
+        }
     }
 
     private Runnable wrapTask( final Runnable task )
@@ -396,9 +413,10 @@ public class Scheduler
             return Scheduler.this.canSchedule();
         }
 
-        void stop( Collection<Description> executedTests, boolean tryCancelFutures, boolean shutdownNow )
+        void stop( Collection<Description> executedTests, Collection<Description> incompleteTests,
+                   boolean tryCancelFutures, boolean shutdownNow )
         {
-            slave.stop( executedTests, tryCancelFutures, shutdownNow );
+            slave.stop( executedTests, incompleteTests, tryCancelFutures, shutdownNow );
         }
 
         /**
@@ -449,7 +467,7 @@ public class Scheduler
         {
             if ( executor.isShutdown() )
             {
-                Scheduler.this.stop( null, true, false );
+                Scheduler.this.stop( null, null, true, false );
             }
             final RejectedExecutionHandler poolHandler = this.poolHandler;
             if ( poolHandler != null )

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/06200e07/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ShutdownResult.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ShutdownResult.java b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ShutdownResult.java
new file mode 100644
index 0000000..ef95be8
--- /dev/null
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ShutdownResult.java
@@ -0,0 +1,57 @@
+package org.apache.maven.surefire.junitcore.pc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.junit.runner.Description;
+
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * Populates collection {@code triggeredTests} of descriptions started before shutting down.
+ * Populates collection {@code incompleteTests} which describes started tests but unfinished due to abrupt shutdown.
+ * The collection {@code triggeredTests} contains all elements from {@code incompleteTests}.
+ *
+ * @author <a href="mailto:tibordigana@apache.org">Tibor Digana (tibor17)</a>
+ * @see Scheduler
+ * @since 2.18
+ */
+public final class ShutdownResult
+{
+    private final Collection<Description> triggeredTests;
+
+    private final Collection<Description> incompleteTests;
+
+    public ShutdownResult( Collection<Description> triggeredTests, Collection<Description> incompleteTests )
+    {
+        this.triggeredTests = triggeredTests == null ? Collections.<Description>emptySet() : triggeredTests;
+        this.incompleteTests = incompleteTests == null ? Collections.<Description>emptySet() : incompleteTests;
+    }
+
+    public Collection<Description> getTriggeredTests()
+    {
+        return triggeredTests;
+    }
+
+    public Collection<Description> getIncompleteTests()
+    {
+        return incompleteTests;
+    }
+}

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/06200e07/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ShutdownStatus.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ShutdownStatus.java b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ShutdownStatus.java
index 6708089..b1a519f 100644
--- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ShutdownStatus.java
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/ShutdownStatus.java
@@ -19,15 +19,9 @@ package org.apache.maven.surefire.junitcore.pc;
  * under the License.
  */
 
-import org.junit.runner.Description;
-
-import java.util.Collection;
 import java.util.concurrent.Future;
 import java.util.concurrent.atomic.AtomicReference;
 
-// CHECKSTYLE_OFF: imports
-import static org.apache.maven.surefire.junitcore.pc.ExecutionStatus.*;
-
 /**
  * Wrapper of {@link ParallelComputer ParallelComputer status information} and tests been populated before
  * a shutdown hook has been triggered.
@@ -38,32 +32,33 @@ import static org.apache.maven.surefire.junitcore.pc.ExecutionStatus.*;
  */
 final class ShutdownStatus
 {
-    private final AtomicReference<ExecutionStatus> status = new AtomicReference<ExecutionStatus>( STARTED );
+    private final AtomicReference<ExecutionStatus> status =
+        new AtomicReference<ExecutionStatus>( ExecutionStatus.STARTED );
 
-    private Future<Collection<Description>> descriptionsBeforeShutdown;
+    private Future<ShutdownResult> descriptionsBeforeShutdown;
 
     boolean tryFinish()
     {
-        return status.compareAndSet( STARTED, FINISHED );
+        return status.compareAndSet( ExecutionStatus.STARTED, ExecutionStatus.FINISHED );
     }
 
     boolean tryTimeout()
     {
-        return status.compareAndSet( STARTED, TIMEOUT );
+        return status.compareAndSet( ExecutionStatus.STARTED, ExecutionStatus.TIMEOUT );
     }
 
     boolean isTimeoutElapsed()
     {
-        return status.get() == TIMEOUT;
+        return status.get() == ExecutionStatus.TIMEOUT;
     }
 
-    Future<Collection<Description>> getDescriptionsBeforeShutdown()
+    Future<ShutdownResult> getDescriptionsBeforeShutdown()
     {
         return descriptionsBeforeShutdown;
     }
 
-    void setDescriptionsBeforeShutdown( Future<Collection<Description>> descriptionsBeforeShutdown )
+    void setDescriptionsBeforeShutdown( Future<ShutdownResult> descriptionsBeforeShutdown )
     {
         this.descriptionsBeforeShutdown = descriptionsBeforeShutdown;
     }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/06200e07/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/SingleThreadScheduler.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/SingleThreadScheduler.java b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/SingleThreadScheduler.java
index 52dba73..87c1114 100644
--- a/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/SingleThreadScheduler.java
+++ b/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/pc/SingleThreadScheduler.java
@@ -68,12 +68,11 @@ final class SingleThreadScheduler
     /**
      * @see Scheduler#describeStopped(boolean)
      */
-    Collection<Description> describeStopped( boolean shutdownNow )
+    ShutdownResult describeStopped( boolean shutdownNow )
     {
-        Collection<Description> activeChildren =
-            new ConcurrentLinkedQueue<Description>( master.describeStopped( shutdownNow ) );
-        activeChildren.removeAll( UNUSED_DESCRIPTIONS );
-        return activeChildren;
+        ShutdownResult shutdownResult = master.describeStopped( shutdownNow );
+        return new ShutdownResult( copyExisting( shutdownResult.getTriggeredTests() ),
+                                   copyExisting( shutdownResult.getIncompleteTests() ) );
     }
 
     /**
@@ -83,4 +82,11 @@ final class SingleThreadScheduler
     {
         return master.shutdownThreadPoolsAwaitingKilled();
     }
+
+    private Collection<Description> copyExisting( Collection<Description> descriptions )
+    {
+        Collection<Description> activeChildren = new ConcurrentLinkedQueue<Description>( descriptions );
+        activeChildren.removeAll( UNUSED_DESCRIPTIONS );
+        return activeChildren;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/06200e07/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/pc/ParallelComputerBuilderTest.java
----------------------------------------------------------------------
diff --git a/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/pc/ParallelComputerBuilderTest.java b/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/pc/ParallelComputerBuilderTest.java
index ce6ef44..63d25f8 100644
--- a/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/pc/ParallelComputerBuilderTest.java
+++ b/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/pc/ParallelComputerBuilderTest.java
@@ -561,7 +561,7 @@ public class ParallelComputerBuilderTest
             {
                 public void run()
                 {
-                    Collection<Description> startedTests = computer.describeStopped( useInterrupt );
+                    Collection<Description> startedTests = computer.describeStopped( useInterrupt ).getTriggeredTests();
                     assertThat( startedTests.size(), is( not( 0 ) ) );
                 }
             };