From d1a72cddd58091896c75fb65fb6afbbf313895ac Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Mon, 11 Sep 2006 14:11:50 +0000 Subject: [PATCH] make test order independant git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@442226 13f79535-47bb-0310-9956-ffa450edef68 --- .../BadMetadataReportProcessorTest.java | 35 +++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/BadMetadataReportProcessorTest.java b/archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/BadMetadataReportProcessorTest.java index 493d5198a..cd9400a31 100644 --- a/archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/BadMetadataReportProcessorTest.java +++ b/archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/BadMetadataReportProcessorTest.java @@ -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() ); } -- 2.39.5