oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfos...@apache.org
Subject svn commit: r1336888 - in /oodt/trunk/pge/src/test/org/apache/oodt/cas/pge: TestPGETaskInstance.java staging/TestFileStager.java
Date Thu, 10 May 2012 21:11:20 GMT
Author: bfoster
Date: Thu May 10 21:11:20 2012
New Revision: 1336888

URL: http://svn.apache.org/viewvc?rev=1336888&view=rev
Log:
- Fixed cas-pge test which was failing because it was running to fast and test directories
where given the same paths which where based on milliseconds... changed to use UUID
- Remove static import for TestFileStager unit-test

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

Modified:
    oodt/trunk/pge/src/test/org/apache/oodt/cas/pge/TestPGETaskInstance.java
    oodt/trunk/pge/src/test/org/apache/oodt/cas/pge/staging/TestFileStager.java

Modified: oodt/trunk/pge/src/test/org/apache/oodt/cas/pge/TestPGETaskInstance.java
URL: http://svn.apache.org/viewvc/oodt/trunk/pge/src/test/org/apache/oodt/cas/pge/TestPGETaskInstance.java?rev=1336888&r1=1336887&r2=1336888&view=diff
==============================================================================
--- oodt/trunk/pge/src/test/org/apache/oodt/cas/pge/TestPGETaskInstance.java (original)
+++ oodt/trunk/pge/src/test/org/apache/oodt/cas/pge/TestPGETaskInstance.java Thu May 10 21:11:20
2012
@@ -38,6 +38,7 @@ import static org.easymock.EasyMock.expe
 import static org.easymock.EasyMock.replay;
 import static org.easymock.EasyMock.verify;
 
+//JDK imports
 import java.io.File;
 import java.io.FileFilter;
 import java.io.FileInputStream;
@@ -50,9 +51,13 @@ import java.util.logging.Handler;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+//JUnit imports
 import junit.framework.TestCase;
 
+//Apache imports
 import org.apache.commons.io.FileUtils;
+
+//OODT imports
 import org.apache.oodt.cas.crawl.AutoDetectProductCrawler;
 import org.apache.oodt.cas.crawl.ProductCrawler;
 import org.apache.oodt.cas.crawl.action.CrawlerAction;
@@ -71,6 +76,7 @@ import org.apache.oodt.cas.workflow.meta
 import org.apache.oodt.cas.workflow.structs.WorkflowTaskConfiguration;
 import org.apache.oodt.cas.workflow.system.XmlRpcWorkflowManagerClient;
 
+//Google imports
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
@@ -558,7 +564,7 @@ public class TestPGETaskInstance extends
    }
 
    private PGETaskInstance createTestInstance() throws Exception {
-      return createTestInstance(Long.toString(System.currentTimeMillis()));
+      return createTestInstance(UUID.randomUUID().toString());
    }
 
    private PGETaskInstance createTestInstance(String workflowInstId)

Modified: oodt/trunk/pge/src/test/org/apache/oodt/cas/pge/staging/TestFileStager.java
URL: http://svn.apache.org/viewvc/oodt/trunk/pge/src/test/org/apache/oodt/cas/pge/staging/TestFileStager.java?rev=1336888&r1=1336887&r2=1336888&view=diff
==============================================================================
--- oodt/trunk/pge/src/test/org/apache/oodt/cas/pge/staging/TestFileStager.java (original)
+++ oodt/trunk/pge/src/test/org/apache/oodt/cas/pge/staging/TestFileStager.java Thu May 10
21:11:20 2012
@@ -48,9 +48,6 @@ import com.google.common.collect.Lists;
 //JUnit imports
 import junit.framework.TestCase;
 
-//OODT static imports
-import static org.apache.oodt.cas.pge.staging.TestFileStager.ProductIdMatcher.eqProductId;
-
 /**
  * Test class for {@link FileStager}.
  * 
@@ -101,7 +98,7 @@ public class TestFileStager extends Test
       ref2.setDataStoreReference(uri2);
 
       XmlRpcFileManagerClient fmClient = createStrictMock(XmlRpcFileManagerClient.class);
-      expect(fmClient.getProductReferences(eqProductId(productId))).andReturn(
+      expect(fmClient.getProductReferences(ProductIdMatcher.eqProductId(productId))).andReturn(
             Lists.newArrayList(ref1, ref2));
       replay(fmClient);
 



Mime
View raw message