From: <bsc...@us...> - 2009-05-06 08:11:34
|
Revision: 4578 http://unicore.svn.sourceforge.net/unicore/?rev=4578&view=rev Author: bschuller Date: 2009-05-06 08:11:29 +0000 (Wed, 06 May 2009) Log Message: ----------- remove direct dependency to DMClientAPI; fix test suite and reduce test chattiness Modified Paths: -------------- workflow/trunk/workflowservice/pom.xml workflow/trunk/workflowservice/src/main/java/org/chemomentum/dsws/WorkflowInstance.java workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestCallbackProcessing.java workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestSimpleLoopProcessing.java workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestStatusReporting.java workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestSubflows.java workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestVariablesActivities.java workflow/trunk/workflowservice/src/test/java/org/chemomentum/dsws/TestDelegates.java workflow/trunk/workflowservice/src/test/java/org/chemomentum/dsws/WSSTestBase.java workflow/trunk/workflowservice/src/test/resources/log4j.properties workflow/trunk/workflowservice/testng-unittests.xml Removed Paths: ------------- workflow/trunk/workflowservice/src/main/java/org/chemomentum/dsws/datamanagement/ Modified: workflow/trunk/workflowservice/pom.xml =================================================================== --- workflow/trunk/workflowservice/pom.xml 2009-05-05 12:01:57 UTC (rev 4577) +++ workflow/trunk/workflowservice/pom.xml 2009-05-06 08:11:29 UTC (rev 4578) @@ -1,7 +1,7 @@ <?xml version="1.0"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <groupId>eu.unicore</groupId> + <groupId>eu.unicore.workflow</groupId> <artifactId>workflowservice</artifactId> <packaging>jar</packaging> <description>UNICORE Workflow engine</description> @@ -11,12 +11,14 @@ <url>http://www.unicore.eu</url> </organization> <url>http://www.unicore.eu</url> - <version>2.0.0-SNAPSHOT</version> + <version>2.0.0-preview1</version> <name>Workflow engine</name> + <scm> <connection>scm:svn:https://unicore.svn.sourceforge.net/svnroot/unicore/workflow/trunk/workflowservice</connection> <developerConnection>scm:svn:https://unicore.svn.sourceforge.net/svnroot/unicore/workflow/trunk/workflowservice</developerConnection> </scm> + <mailingLists> <mailingList> <name>Development</name> @@ -31,25 +33,23 @@ <archive>http://sourceforge.net/mailarchive/forum.php?forum_name=unicore-support</archive> </mailingList> </mailingLists> + <prerequisites> <maven>2.0.9</maven> </prerequisites> + <properties> <compiler.fork>false</compiler.fork> </properties> + <dependencies> - <dependency> - <groupId>eu.unicore</groupId> - <artifactId>uas-core</artifactId> - <version>1.2.0</version> - </dependency> - <dependency> + <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>5.8</version> <scope>test</scope> <classifier>jdk15</classifier> - </dependency> + </dependency> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all-minimal</artifactId> @@ -65,66 +65,12 @@ <artifactId>bsh</artifactId> <version>1.3.0</version> </dependency> - <!-- CHEMOMENTUM GENERAL --> <dependency> - <groupId>org.chemomentum</groupId> - <artifactId>tracer</artifactId> - <version>1.5.3</version> - <exclusions> - <exclusion> - <groupId>de.fzj.unicore</groupId> - <artifactId>uas-core</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.chemomentum</groupId> + <groupId>eu.unicore.workflow</groupId> <artifactId>common</artifactId> - <version>1.5.10</version> - <exclusions> - <exclusion> - <groupId>de.fzj.unicore</groupId> - <artifactId>uas-core</artifactId> - </exclusion> - <exclusion> - <groupId>net.sf.saxon</groupId> - <artifactId>saxon</artifactId> - </exclusion> - <exclusion> - <groupId>net.sf.saxon</groupId> - <artifactId>saxon-dom</artifactId> - </exclusion> - <exclusion> - <groupId>net.sf.saxon</groupId> - <artifactId>saxon-xpath</artifactId> - </exclusion> - </exclusions> - </dependency> + <version>2.0.0-preview1</version> + </dependency> -<!-- CHEMOMENTUM DATAMANAGEMENT --> - <dependency> - <groupId>org.chemomentum</groupId> - <artifactId>DMClientAPI</artifactId> - <version>2.3.2</version> - <exclusions> - <exclusion> - <groupId>net.sf.saxon</groupId> - <artifactId>saxon</artifactId> - </exclusion> - <exclusion> - <groupId>net.sf.saxon</groupId> - <artifactId>saxon-dom</artifactId> - </exclusion> - <exclusion> - <groupId>net.sf.saxon</groupId> - <artifactId>saxon-xpath</artifactId> - </exclusion> - <exclusion> - <groupId>pl.edu.icm.unicore</groupId> - <artifactId>uas-vo</artifactId> - </exclusion> - </exclusions> - </dependency> </dependencies> <repositories> <repository> Modified: workflow/trunk/workflowservice/src/main/java/org/chemomentum/dsws/WorkflowInstance.java =================================================================== --- workflow/trunk/workflowservice/src/main/java/org/chemomentum/dsws/WorkflowInstance.java 2009-05-05 12:01:57 UTC (rev 4577) +++ workflow/trunk/workflowservice/src/main/java/org/chemomentum/dsws/WorkflowInstance.java 2009-05-06 08:11:29 UTC (rev 4578) @@ -8,9 +8,9 @@ import org.apache.log4j.Logger; import org.apache.xmlbeans.XmlObject; +import org.chemomentum.common.api.workflow.MetadataStore; import org.chemomentum.common.util.Config; import org.chemomentum.common.ws.WorkflowManagement; -import org.chemomentum.dsws.datamanagement.StoreWorkflowMetadata; import org.chemomentum.dsws.rp.DetailedStatusResourceProperty; import org.chemomentum.dsws.rp.JobReferenceRP; import org.chemomentum.dsws.rp.OutputFilesResourceProperty; @@ -73,18 +73,6 @@ private static final Logger logger=LogUtil.getLogger(LogUtil.SERVICES,WorkflowInstance.class); - /** - * TODO move to interface - * Resource property for the EPR of the location mapper used - */ - public static final QName RPLocationMapperAddress=LocationMapperAddressDocument.type.getDocumentElementName(); - - /** - * TODO move to interface - * Resource property for the human-friendly workflow name - */ - public static final QName RPWorkflowName=WorkflowNameDocument.type.getDocumentElementName(); - @Persist private String dialect; @@ -219,11 +207,8 @@ protected void storeMetaData(){ try{ if(Config.isUnitTesting())return; - XmlObject workflow=properties.get(RPSubmittedWorkflow).getXml()[0]; - WorkflowNameDocument wfNameDoc=properties.get(RPWorkflowName)!=null? - ((WorkflowNameDocument)properties.get(RPWorkflowName).getXml()[0]): null; - String wfName=wfNameDoc!=null?wfNameDoc.getWorkflowName():getUniqueID(); - StoreWorkflowMetadata swmd=new StoreWorkflowMetadata(getUniqueID(),getSecurityTokens(),getOwner(),workflow,wfName); + MetadataStore swmd=Config.getMetadataStore(); + swmd.setWorkflowInstance(this); //synchronous OK?! swmd.run(); }catch(Exception ex){ Modified: workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestCallbackProcessing.java =================================================================== --- workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestCallbackProcessing.java 2009-05-05 12:01:57 UTC (rev 4577) +++ workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestCallbackProcessing.java 2009-05-06 08:11:29 UTC (rev 4578) @@ -50,13 +50,11 @@ PEConfig.getInstance().getProcessEngine().process(job, null); while(true){ Integer s=xnjs.getConfig().getEMSManager().getStatus(job.getWorkflowID(), null); - System.out.println("Status: "+ActionStatus.toString(s)); if(ActionStatus.RUNNING!=s.intValue()){ Thread.sleep(1000); } else break; } - System.out.println("Action is running"); Thread.sleep(2000); String waID=WorkAssignmentUtils.getEncodedWorkAssignmentID(wfID,"a1", "1", "1"); cp.failed(waID, "aborted", "Manually aborted", null); Modified: workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestSimpleLoopProcessing.java =================================================================== --- workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestSimpleLoopProcessing.java 2009-05-05 12:01:57 UTC (rev 4577) +++ workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestSimpleLoopProcessing.java 2009-05-06 08:11:29 UTC (rev 4578) @@ -44,7 +44,6 @@ } assert(Validate.wasInvoked("a1")); Integer i=Validate.getInvocations("a1"); - System.out.println("Was invoked: "+i.intValue()); assert(N==i.intValue()); } Modified: workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestStatusReporting.java =================================================================== --- workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestStatusReporting.java 2009-05-05 12:01:57 UTC (rev 4577) +++ workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestStatusReporting.java 2009-05-06 08:11:29 UTC (rev 4578) @@ -49,7 +49,6 @@ while(true){ Integer s=xnjs.getConfig().getEMSManager().getStatus(job.getWorkflowID(), null); - System.out.println("Status: "+ActionStatus.toString(s)); if(ActionStatus.DONE!=s.intValue()){ Thread.sleep(1000); } Modified: workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestSubflows.java =================================================================== --- workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestSubflows.java 2009-05-05 12:01:57 UTC (rev 4577) +++ workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestSubflows.java 2009-05-06 08:11:29 UTC (rev 4578) @@ -31,7 +31,6 @@ while(true){ Integer s=xnjs.getConfig().getEMSManager().getStatus(wfID, null); - System.out.println("Status: "+ActionStatus.toString(s)); if(ActionStatus.DONE!=s.intValue()){ Thread.sleep(1000); } @@ -61,7 +60,6 @@ while(true){ Integer s=xnjs.getConfig().getEMSManager().getStatus(wfID, null); - System.out.println("Status: "+ActionStatus.toString(s)); if(ActionStatus.DONE!=s.intValue()){ Thread.sleep(1000); } Modified: workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestVariablesActivities.java =================================================================== --- workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestVariablesActivities.java 2009-05-05 12:01:57 UTC (rev 4577) +++ workflow/trunk/workflowservice/src/test/java/eu/unicore/workflow/pe/TestVariablesActivities.java 2009-05-06 08:11:29 UTC (rev 4578) @@ -29,7 +29,6 @@ PEConfig.getInstance().getProcessEngine().process(job, null); while(true){ Integer s=xnjs.getConfig().getEMSManager().getStatus(job.getWorkflowID(), null); - System.out.println("Status: "+ActionStatus.toString(s)); if(ActionStatus.DONE!=s.intValue()){ Thread.sleep(1000); } @@ -48,7 +47,6 @@ PEConfig.getInstance().getProcessEngine().process(job, null); while(true){ Integer s=xnjs.getConfig().getEMSManager().getStatus(job.getWorkflowID(), null); - System.out.println("Status: "+ActionStatus.toString(s)); if(ActionStatus.DONE!=s.intValue()){ Thread.sleep(1000); } @@ -87,7 +85,6 @@ xnjs.getConfig().getEMSManager().add(action, null); while(true){ Integer s=xnjs.getConfig().getEMSManager().getStatus(job.getWorkflowID(), null); - System.out.println("Status: "+ActionStatus.toString(s)); if(ActionStatus.DONE!=s.intValue()){ Thread.sleep(1000); } Modified: workflow/trunk/workflowservice/src/test/java/org/chemomentum/dsws/TestDelegates.java =================================================================== --- workflow/trunk/workflowservice/src/test/java/org/chemomentum/dsws/TestDelegates.java 2009-05-05 12:01:57 UTC (rev 4577) +++ workflow/trunk/workflowservice/src/test/java/org/chemomentum/dsws/TestDelegates.java 2009-05-06 08:11:29 UTC (rev 4578) @@ -43,7 +43,6 @@ d.addNewCreateWorkflowResource(); CreateWorkflowResponseDocument res=ws.create(d); assertNotNull(res); - System.out.println(res); BaseWSRFClient w=new BaseWSRFClient(res.getCreateWorkflowResponse().getEndpointReference()); String s=(w.getResourcePropertyDocument()); assertNotNull(s); Modified: workflow/trunk/workflowservice/src/test/java/org/chemomentum/dsws/WSSTestBase.java =================================================================== --- workflow/trunk/workflowservice/src/test/java/org/chemomentum/dsws/WSSTestBase.java 2009-05-05 12:01:57 UTC (rev 4577) +++ workflow/trunk/workflowservice/src/test/java/org/chemomentum/dsws/WSSTestBase.java 2009-05-06 08:11:29 UTC (rev 4578) @@ -6,6 +6,7 @@ import org.chemomentum.common.ws.WorkflowManagement; import org.chemomentum.dsws.util.SetupWorkflowService; import org.chemomentum.workflow.callback.CallbackImpl; +import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.w3.x2005.x08.addressing.EndpointReferenceType; @@ -36,7 +37,13 @@ new SetupWorkflowService().run(); } + @AfterClass @Override + protected void tearDown()throws Exception{ + super.tearDown(); + } + + @Override protected void addServices() throws Exception { DeploymentCenter.getInstance().deployService(IWorkflowFactory.SERVICE_NAME, Modified: workflow/trunk/workflowservice/src/test/resources/log4j.properties =================================================================== --- workflow/trunk/workflowservice/src/test/resources/log4j.properties 2009-05-05 12:01:57 UTC (rev 4577) +++ workflow/trunk/workflowservice/src/test/resources/log4j.properties 2009-05-06 08:11:29 UTC (rev 4578) @@ -2,7 +2,7 @@ # default/fallback log4j config on classpath # # Set root logger level to WARN and its only appender to A1. -log4j.rootLogger=INFO, A1 +log4j.rootLogger=WARN, A1 # A1 is set to be a ConsoleAppender. log4j.appender.A1=org.apache.log4j.ConsoleAppender @@ -12,6 +12,4 @@ log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c{1} %x - %m%n -log4j.logger.unicore.services.WSResourceImpl=DEBUG - -log4j.logger.unicore.services=DEBUG +log4j.logger.unicore.services=WARN Modified: workflow/trunk/workflowservice/testng-unittests.xml =================================================================== --- workflow/trunk/workflowservice/testng-unittests.xml 2009-05-05 12:01:57 UTC (rev 4577) +++ workflow/trunk/workflowservice/testng-unittests.xml 2009-05-06 08:11:29 UTC (rev 4578) @@ -39,7 +39,7 @@ </test> <test verbose="2" name="Splitting condition evaluation" annotations="JDK"> <classes> - <class name="eu.unicore.workflow.pe.model.TestSplitConditionProcessing"/> + <class name="eu.unicore.workflow.pe.TestSplitConditionProcessing"/> </classes> </test> <test verbose="2" name="Workflow containing simple loops" annotations="JDK"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |