maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r999982 - /maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/AbstractDirectoryTestSuite.java
Date Wed, 22 Sep 2010 14:34:54 GMT
Author: dennisl
Date: Wed Sep 22 14:34:54 2010
New Revision: 999982

URL: http://svn.apache.org/viewvc?rev=999982&view=rev
Log:
[SUREFIRE-321] Run tests in alphabetical order
Submitted by: Nicolas Vogel and Simon van der Sluis
Reviewed by: Dennis Lundberg

Patch applied with modifications, thanks!

Modified:
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/AbstractDirectoryTestSuite.java

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/AbstractDirectoryTestSuite.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/AbstractDirectoryTestSuite.java?rev=999982&r1=999981&r2=999982&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/AbstractDirectoryTestSuite.java
(original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/AbstractDirectoryTestSuite.java
Wed Sep 22 14:34:54 2010
@@ -30,18 +30,19 @@ import org.apache.maven.surefire.testset
 
 import java.io.File;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.ResourceBundle;
+import java.util.SortedMap;
+import java.util.TreeMap;
 
 public abstract class AbstractDirectoryTestSuite
     implements SurefireTestSuite
 {
     protected static ResourceBundle bundle = ResourceBundle.getBundle( Surefire.SUREFIRE_BUNDLE_NAME
);
 
-    protected Map testSets;
+    protected SortedMap testSets;
 
     private int totalTests;
     
@@ -60,7 +61,7 @@ public abstract class AbstractDirectoryT
         {
             throw new IllegalStateException( "You can't call locateTestSets twice" );
         }
-        testSets = new HashMap();
+        testSets = new TreeMap();
 
         Class[] locatedClasses = surefireDirectoryScanner.locateTestClasses( classLoader);
 
@@ -83,7 +84,7 @@ public abstract class AbstractDirectoryT
                 totalTests++;
         }
 
-        return Collections.unmodifiableMap( testSets );
+        return Collections.unmodifiableSortedMap( testSets );
     }
 
     protected abstract SurefireTestSet createTestSet( Class testClass, ClassLoader classLoader
)



Mime
View raw message