You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by pa...@apache.org on 2011/09/07 00:21:39 UTC

svn commit: r1165910 - in /incubator/airavata/trunk/modules/gfac-core: pom.xml src/test/java/org/apache/airavata/core/gfac/factory/EchoLocalFactoryTest.java

Author: patanachai
Date: Tue Sep  6 22:21:39 2011
New Revision: 1165910

URL: http://svn.apache.org/viewvc?rev=1165910&view=rev
Log:
Fix test error and move working directory to target folder.

Modified:
    incubator/airavata/trunk/modules/gfac-core/pom.xml
    incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/factory/EchoLocalFactoryTest.java

Modified: incubator/airavata/trunk/modules/gfac-core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/pom.xml?rev=1165910&r1=1165909&r2=1165910&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/pom.xml (original)
+++ incubator/airavata/trunk/modules/gfac-core/pom.xml Tue Sep  6 22:21:39 2011
@@ -1,139 +1,152 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <!--Licensed to the Apache Software Foundation (ASF) under one or more contributor 
-	license agreements. See the NOTICE file distributed with this work for additional 
-	information regarding copyright ownership. The ASF licenses this file to 
-	you under the Apache License, Version 2.0 (theÏ "License"); you may not use 
-	this file except in compliance with the License. You may obtain a copy of 
-	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
-	by applicable law or agreed to in writing, software distributed under the 
-	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
-	OF ANY ~ KIND, either express or implied. See the License for the specific 
-	language governing permissions and limitations under the License. -->
+    license agreements. See the NOTICE file distributed with this work for additional 
+    information regarding copyright ownership. The ASF licenses this file to 
+    you under the Apache License, Version 2.0 (theÏ "License"); you may not use 
+    this file except in compliance with the License. You may obtain a copy of 
+    the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+    by applicable law or agreed to in writing, software distributed under the 
+    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+    OF ANY ~ KIND, either express or implied. See the License for the specific 
+    language governing permissions and limitations under the License. -->
 
 <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/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>airavata</groupId>
-	<artifactId>gfac-core</artifactId>
-	<version>0.0.1-SNAPSHOT</version>
-	<name>GFac-Core</name>
-	<description>The core GFAC functionality independent from any webservice implementation. </description>
-	<properties>
-		<org.slf4j.version>1.6.1</org.slf4j.version>
-		<log4j.version>1.2.16</log4j.version>
-	</properties>
-	<repositories>
-		<repository>
-			<name>ogce.m2.all</name>
-			<id>ogce.m2.all</id>
-			<url>http://community.ucs.indiana.edu:9090/archiva/repository/ogce.m2.all</url>
-			<snapshots>
-				<updatePolicy>daily</updatePolicy>
-			</snapshots>
-		</repository>
-	</repositories>
-
-	<dependencies>		
-		<dependency>
-			<groupId>cog-jglobus</groupId>
-			<artifactId>cog-jglobus</artifactId>
-			<version>1.8.0_1</version>
-		</dependency>
-		<dependency>
-			<groupId>cog-4_1_6_rc2</groupId>
-			<artifactId>puretls</artifactId>
-			<type>jar</type>
-			<version>cog-4_1_6</version>
-		</dependency>
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>airavata</groupId>
+    <artifactId>gfac-core</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>GFac-Core</name>
+    <description>The core GFAC functionality independent from any webservice implementation. </description>
+    <properties>
+        <org.slf4j.version>1.6.1</org.slf4j.version>
+        <log4j.version>1.2.16</log4j.version>
+    </properties>
+    <repositories>
+        <repository>
+            <name>ogce.m2.all</name>
+            <id>ogce.m2.all</id>
+            <url>http://community.ucs.indiana.edu:9090/archiva/repository/ogce.m2.all</url>
+            <snapshots>
+                <updatePolicy>daily</updatePolicy>
+            </snapshots>
+        </repository>
+    </repositories>
+
+    <dependencies>
+        <dependency>
+            <groupId>cog-jglobus</groupId>
+            <artifactId>cog-jglobus</artifactId>
+            <version>1.8.0_1</version>
+        </dependency>
+        <dependency>
+            <groupId>cog-4_1_6_rc2</groupId>
+            <artifactId>puretls</artifactId>
+            <type>jar</type>
+            <version>cog-4_1_6</version>
+        </dependency>
         <dependency>
             <groupId>cog-4_1_6_rc2</groupId>
             <artifactId>cryptix32</artifactId>
             <version>cog-4_1_6</version>
-        </dependency>        
-		<dependency>
-			<groupId>cog-4_1_6_rc2</groupId>
-			<artifactId>cryptix-asn1</artifactId>
-			<version>cog-4_1_6</version>
-		</dependency>
-		<dependency>
-			<groupId>bouncycastle</groupId>
-			<artifactId>bcprov-jdk15</artifactId>
-			<version>143</version>
-		</dependency>
-		
-		<!-- Logging -->		
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-api</artifactId>
-			<version>${org.slf4j.version}</version>
-		</dependency>
-
-		<!-- GFAC schemas -->
-		<dependency>
-			<groupId>airavata</groupId>
-			<artifactId>airavata-gfac-schema-utils</artifactId>
-			<version>0.0.1-SNAPSHOT</version>
-		</dependency>
+        </dependency>
+        <dependency>
+            <groupId>cog-4_1_6_rc2</groupId>
+            <artifactId>cryptix-asn1</artifactId>
+            <version>cog-4_1_6</version>
+        </dependency>
+        <dependency>
+            <groupId>bouncycastle</groupId>
+            <artifactId>bcprov-jdk15</artifactId>
+            <version>143</version>
+        </dependency>
+
+        <!-- Logging -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>${org.slf4j.version}</version>
+        </dependency>
+
+        <!-- GFAC schemas -->
+        <dependency>
+            <groupId>airavata</groupId>
+            <artifactId>airavata-gfac-schema-utils</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
 
-		<!-- Workflow Tracking -->
+        <!-- Workflow Tracking -->
         <dependency>
             <groupId>airavata</groupId>
             <artifactId>airavata-workflowtracking</artifactId>
             <version>0.0.1-SNAPSHOT</version>
-        </dependency>                
+        </dependency>
+
+        <!-- Xregistry jars -->
+        <dependency>
+            <groupId>xregistry</groupId>
+            <artifactId>xregistry-client</artifactId>
+            <version>1.2.2</version>
+        </dependency>
+        <dependency>
+            <groupId>xregistry</groupId>
+            <artifactId>xregistry_generated</artifactId>
+            <version>0.8.3</version>
+            <type>jar</type>
+        </dependency>
+
+        <!-- SSH -->
+        <dependency>
+            <groupId>net.schmizz</groupId>
+            <artifactId>sshj</artifactId>
+            <version>0.3.1</version>
+        </dependency>
 
-		<!-- Xregistry jars -->
-		<dependency>
-			<groupId>xregistry</groupId>
-			<artifactId>xregistry-client</artifactId>
-			<version>1.2.2</version>
-		</dependency>
-		<dependency>
-			<groupId>xregistry</groupId>
-			<artifactId>xregistry_generated</artifactId>
-			<version>0.8.3</version>
-			<type>jar</type>
-		</dependency>
-
-		<!-- SSH -->
-		<dependency>
-			<groupId>net.schmizz</groupId>
-			<artifactId>sshj</artifactId>
-			<version>0.3.1</version>
-		</dependency>
-
-		<!-- Amazon -->
-		<dependency>
-			<groupId>com.amazonaws</groupId>
-			<artifactId>aws-java-sdk</artifactId>
-			<version>1.1.8</version>
-		</dependency>
-
-		<!-- Test -->        
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>4.7</version>
+        <!-- Amazon -->
+        <dependency>
+            <groupId>com.amazonaws</groupId>
+            <artifactId>aws-java-sdk</artifactId>
+            <version>1.1.8</version>
+        </dependency>
+
+        <!-- Test -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.7</version>
             <scope>test</scope>
-		</dependency>	
+        </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-simple</artifactId>
             <version>${org.slf4j.version}</version>
             <scope>test</scope>
-        </dependency>        
-		<dependency>
-			<groupId>org.apache.jackrabbit</groupId>
-			<artifactId>jackrabbit-core</artifactId>
-			<version>2.2.7</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.jackrabbit</groupId>
-			<artifactId>jackrabbit-jcr-rmi</artifactId>
-			<version>2.2.7</version>
-			<scope>test</scope>
-		</dependency>		
-	</dependencies>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.jackrabbit</groupId>
+            <artifactId>jackrabbit-core</artifactId>
+            <version>2.2.8</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.jackrabbit</groupId>
+            <artifactId>jackrabbit-jcr-rmi</artifactId>
+            <version>2.2.8</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <!-- Set working directory to test-class directory -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                  <workingDirectory>${project.build.testOutputDirectory}</workingDirectory>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>

Modified: incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/factory/EchoLocalFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/factory/EchoLocalFactoryTest.java?rev=1165910&r1=1165909&r2=1165910&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/factory/EchoLocalFactoryTest.java (original)
+++ incubator/airavata/trunk/modules/gfac-core/src/test/java/org/apache/airavata/core/gfac/factory/EchoLocalFactoryTest.java Tue Sep  6 22:21:39 2011
@@ -22,9 +22,10 @@
 package org.apache.airavata.core.gfac.factory;
 
 import org.apache.airavata.core.gfac.context.InvocationContext;
-import org.apache.airavata.core.gfac.context.MessageContext;
+import org.apache.airavata.core.gfac.context.impl.ExecutionContextImpl;
 import org.apache.airavata.core.gfac.context.impl.ParameterContextImpl;
 import org.apache.airavata.core.gfac.exception.GfacException;
+import org.apache.airavata.core.gfac.notification.impl.StandardOutNotification;
 import org.apache.airavata.core.gfac.services.GenericService;
 import org.apache.airavata.core.gfac.type.parameter.StringParameter;
 import org.junit.Assert;
@@ -52,7 +53,11 @@ public class EchoLocalFactoryTest {
 		output.addParameter("echo_output", b);
 
 		ct.addMessageContext("input", input);
-		ct.addMessageContext("output", output);
+		ct.addMessageContext("output", output);	
+		
+		ct.setExecutionContext(new ExecutionContextImpl());
+		ct.getExecutionContext().setNotificationService(new StandardOutNotification());
+		
 
 		try {
 			GenericService service = new EchoLocalServiceFactory()