]> source.dussan.org Git - archiva.git/commitdiff
make test order independant
authorBrett Porter <brett@apache.org>
Mon, 11 Sep 2006 14:11:50 +0000 (14:11 +0000)
committerBrett Porter <brett@apache.org>
Mon, 11 Sep 2006 14:11:50 +0000 (14:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@442226 13f79535-47bb-0310-9956-ffa450edef68

archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/BadMetadataReportProcessorTest.java

index 493d5198a66bc72848d62154a843e651bba52b54..cd9400a311ac9dd0e6c730bfab7452743e4bbbc6 100644 (file)
@@ -92,13 +92,36 @@ public class BadMetadataReportProcessorTest
         Result result = (Result) failures.next();
         assertEquals( "check reason", "Missing lastUpdated element inside the metadata.", result.getReason() );
         result = (Result) failures.next();
-        assertEquals( "check reason",
-                      "Artifact version 1.0-alpha-1 found in the repository but missing in the metadata.",
-                      result.getReason() );
+        boolean alpha1First = false;
+        if ( result.getReason().indexOf( "alpha-1" ) > 0 )
+        {
+            alpha1First = true;
+        }
+        if ( alpha1First )
+        {
+            assertEquals( "check reason",
+                          "Artifact version 1.0-alpha-1 found in the repository but missing in the metadata.",
+                          result.getReason() );
+        }
+        else
+        {
+            assertEquals( "check reason",
+                          "Artifact version 1.0-alpha-2 found in the repository but missing in the metadata.",
+                          result.getReason() );
+        }
         result = (Result) failures.next();
-        assertEquals( "check reason",
-                      "Artifact version 1.0-alpha-2 found in the repository but missing in the metadata.",
-                      result.getReason() );
+        if ( !alpha1First )
+        {
+            assertEquals( "check reason",
+                          "Artifact version 1.0-alpha-1 found in the repository but missing in the metadata.",
+                          result.getReason() );
+        }
+        else
+        {
+            assertEquals( "check reason",
+                          "Artifact version 1.0-alpha-2 found in the repository but missing in the metadata.",
+                          result.getReason() );
+        }
         assertFalse( "check no more failures", failures.hasNext() );
     }