Author: bfoster
Date: Sun Dec  4 21:02:54 2011
New Revision: 1210220

URL: http://svn.apache.org/viewvc?rev=1210220&view=rev
Log:
- fixed list order for filemgr test... order differs based on computer which 
tests is run

---------------

Modified:
    
oodt/trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/cli/action/TestIngestProductCliAction.java

Modified: 
oodt/trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/cli/action/TestIngestProductCliAction.java
URL: 
http://svn.apache.org/viewvc/oodt/trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/cli/action/TestIngestProductCliAction.java?rev=1210220&r1=1210219&r2=1210220&view=diff
==============================================================================
--- 
oodt/trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/cli/action/TestIngestProductCliAction.java
 (original)
+++ 
oodt/trunk/filemgr/src/test/org/apache/oodt/cas/filemgr/cli/action/TestIngestProductCliAction.java
 Sun Dec  4 21:02:54 2011
@@ -23,6 +23,8 @@ import java.io.IOException;
 import java.io.PrintStream;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.Collections;
+import java.util.Comparator;
 
 //Apache imports
 import org.apache.commons.io.FileUtils;
@@ -35,6 +37,7 @@ import org.apache.oodt.cas.filemgr.datat
 import org.apache.oodt.cas.filemgr.datatransfer.InPlaceDataTransferer;
 import org.apache.oodt.cas.filemgr.structs.Product;
 import org.apache.oodt.cas.filemgr.structs.ProductType;
+import org.apache.oodt.cas.filemgr.structs.Reference;
 import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
 import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
 import org.apache.oodt.cas.metadata.Metadata;
@@ -187,6 +190,12 @@ public class TestIngestProductCliAction 
       assertEquals(Product.STRUCTURE_HIERARCHICAL, 
clientSetProduct.getProductStructure());
       assertEquals(PRODUCT_TYPE_NAME, 
clientSetProduct.getProductType().getName());
       assertEquals(3, clientSetProduct.getProductReferences().size());
+      Collections.sort(clientSetProduct.getProductReferences(), new 
Comparator<Reference>() {
+         @Override
+         public int compare(Reference ref1, Reference ref2) {
+            return ref1.getOrigReference().compareTo(ref2.getOrigReference());
+         }
+      });
       assertEquals("file:" + hierRefFile.getAbsolutePath() + "/", 
clientSetProduct.getProductReferences().get(0).getOrigReference());
       assertEquals("file:" + new File(hierRefFile, 
SUB_REF_1).getAbsolutePath(), 
clientSetProduct.getProductReferences().get(1).getOrigReference());
       assertEquals("file:" + new File(hierRefFile, 
SUB_REF_2).getAbsolutePath(), 
clientSetProduct.getProductReferences().get(2).getOrigReference());
@@ -212,6 +221,12 @@ public class TestIngestProductCliAction 
       assertEquals(Product.STRUCTURE_HIERARCHICAL, 
clientSetProduct.getProductStructure());
       assertEquals(PRODUCT_TYPE_NAME, 
clientSetProduct.getProductType().getName());
       assertEquals(3, clientSetProduct.getProductReferences().size());
+      Collections.sort(clientSetProduct.getProductReferences(), new 
Comparator<Reference>() {
+         @Override
+         public int compare(Reference ref1, Reference ref2) {
+            return ref1.getOrigReference().compareTo(ref2.getOrigReference());
+         }
+      });
       assertEquals("file:" + hierRefFile.getAbsolutePath() + "/", 
clientSetProduct.getProductReferences().get(0).getOrigReference());
       assertEquals("file:" + new File(hierRefFile, 
SUB_REF_1).getAbsolutePath(), 
clientSetProduct.getProductReferences().get(1).getOrigReference());
       assertEquals("file:" + new File(hierRefFile, 
SUB_REF_2).getAbsolutePath(), 
clientSetProduct.getProductReferences().get(2).getOrigReference());


Reply via email to