airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramin...@apache.org
Subject svn commit: r1393172 - in /airavata/trunk: ./ modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/ modules/commons/common-registry-api/ modules/commons/provenance-registry/ modules/commons/registry-api/ modules/commons/registry-ap...
Date Tue, 02 Oct 2012 20:46:24 GMT
Author: raminder
Date: Tue Oct  2 20:46:23 2012
New Revision: 1393172

URL: http://svn.apache.org/viewvc?rev=1393172&view=rev
Log:
removed Jackrabbit dependency. (AIRAVATA-589)

Removed:
    airavata/trunk/modules/commons/registry-api/src/test/java/org/apache/airavata/registry/api/impl/JCRRegistryDeleteTest.java
    airavata/trunk/modules/commons/registry-api/src/test/java/org/apache/airavata/registry/api/impl/JCRRegistryRestartTest.java
    airavata/trunk/modules/commons/registry-api/src/test/java/org/apache/airavata/registry/api/impl/JCRRegistrySearchTest.java
    airavata/trunk/modules/commons/registry-api/src/test/java/org/apache/airavata/registry/api/impl/JCRRegistryTest.java
    airavata/trunk/modules/distribution/src/main/resources/bin/jackrabbit-server.bat
    airavata/trunk/modules/distribution/src/main/resources/bin/jackrabbit-server.sh
    airavata/trunk/modules/distribution/src/main/resources/conf/jcr.properties
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/registry/jackrabbit/user/
Modified:
    airavata/trunk/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java
    airavata/trunk/modules/commons/common-registry-api/pom.xml
    airavata/trunk/modules/commons/provenance-registry/pom.xml
    airavata/trunk/modules/commons/registry-api/pom.xml
    airavata/trunk/modules/distribution/pom.xml
    airavata/trunk/modules/gfac-core/pom.xml
    airavata/trunk/modules/test-suite/pom.xml
    airavata/trunk/modules/workflow-model/workflow-model-core/pom.xml
    airavata/trunk/modules/xbaya-gui/pom.xml
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/SimpleInvoker.java
    airavata/trunk/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/RegistryServiceTest.java
    airavata/trunk/pom.xml

Modified: airavata/trunk/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java?rev=1393172&r1=1393171&r2=1393172&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java
(original)
+++ airavata/trunk/modules/airavata-client/src/test/java/org/apache/airavata/client/airavata/AiravataClientTest.java
Tue Oct  2 20:46:23 2012
@@ -23,8 +23,7 @@ package org.apache.airavata.client.airav
 import org.apache.airavata.common.registry.api.exception.RegistryException;
 import org.apache.airavata.common.registry.api.impl.JCRRegistry;
 import org.apache.airavata.xbaya.interpretor.NameValue;
-import org.apache.jackrabbit.core.RepositoryCopier;
-import org.apache.jackrabbit.core.config.RepositoryConfig;
+
 import org.junit.Test;
 
 import javax.jcr.ImportUUIDBehavior;
@@ -64,49 +63,49 @@ public class AiravataClientTest {
 
     @Test
     public void testExperimentDeletion() {
-        URI uri1 = null,uri2 = null;
-        try {
-            uri1 = new URI("http://gw56.quarry.iu.teragrid.org:8090/jackrabbit-webapp-2.4.0/rmi");
-            uri2 = new URI("http://gf7.ucs.indiana.edu:8030/jackrabbit/rmi");
-        } catch (URISyntaxException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
-        }
-        HashMap<String, String> map = new HashMap<String, String>();
-        map.put("org.apache.jackrabbit.repository.uri", "http://gf7.ucs.indiana.edu:8030/jackrabbit/rmi");
-        try {
-            JCRRegistry jcrRegistry1 = new JCRRegistry(
-                    uri1,
-                    "org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory",
-                    "admin",
-                    "admin", map);
-            Session session = jcrRegistry1.getSession();
-//            session.importXML("/SERVICE_HOST",export, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING);
-            javax.jcr.Node serviceHost = jcrRegistry1.getOrAddNode(jcrRegistry1.getRootNode(session),
"experiments");
-            serviceHost.remove();
-            session.save();
-//            javax.jcr.Node appHost = jcrRegistry1.getOrAddNode(jcrRegistry1.getRootNode(session),
"APP_HOST");
-//            javax.jcr.Node workflows = jcrRegistry1.getOrAddNode(jcrRegistry1.getRootNode(session),
"WORKFLOWS");
-//
-//            HashMap<String, String> map2 = new HashMap<String, String>();
-//            map2.put("org.apache.jackrabbit.repository.uri", "http://gf7.ucs.indiana.edu:8030/jackrabbit/rmi");
-//            JCRRegistry jcrRegistry2 = new JCRRegistry(
-//                    uri2,
+//        URI uri1 = null,uri2 = null;
+//        try {
+//            uri1 = new URI("http://gw56.quarry.iu.teragrid.org:8090/jackrabbit-webapp-2.4.0/rmi");
+//            uri2 = new URI("http://gf7.ucs.indiana.edu:8030/jackrabbit/rmi");
+//        } catch (URISyntaxException e) {
+//            e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
+//        }
+//        HashMap<String, String> map = new HashMap<String, String>();
+//        map.put("org.apache.jackrabbit.repository.uri", "http://gf7.ucs.indiana.edu:8030/jackrabbit/rmi");
+//        try {
+//            JCRRegistry jcrRegistry1 = new JCRRegistry(
+//                    uri1,
 //                    "org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory",
 //                    "admin",
-//                    "admin", map2);
-//            Session session2 = jcrRegistry2.getSession();
+//                    "admin", map);
+//            Session session = jcrRegistry1.getSession();
+////            session.importXML("/SERVICE_HOST",export, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING);
+//            javax.jcr.Node serviceHost = jcrRegistry1.getOrAddNode(jcrRegistry1.getRootNode(session),
"experiments");
+//            serviceHost.remove();
+//            session.save();
+////            javax.jcr.Node appHost = jcrRegistry1.getOrAddNode(jcrRegistry1.getRootNode(session),
"APP_HOST");
+////            javax.jcr.Node workflows = jcrRegistry1.getOrAddNode(jcrRegistry1.getRootNode(session),
"WORKFLOWS");
+////
+////            HashMap<String, String> map2 = new HashMap<String, String>();
+////            map2.put("org.apache.jackrabbit.repository.uri", "http://gf7.ucs.indiana.edu:8030/jackrabbit/rmi");
+////            JCRRegistry jcrRegistry2 = new JCRRegistry(
+////                    uri2,
+////                    "org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory",
+////                    "admin",
+////                    "admin", map2);
+////            Session session2 = jcrRegistry2.getSession();
+////
+////            RepositoryCopier.copy(session.getRepository(),jcrRegistry2.getRepository());
+////            Node service_host = jcrRegistry2.getOrAddNode(jcrRegistry2.getRootNode(session2),
"SERVICE_HOST");
+////            service_host = serviceHost;
+////            session2.save();
+////
 //
-//            RepositoryCopier.copy(session.getRepository(),jcrRegistry2.getRepository());
-//            Node service_host = jcrRegistry2.getOrAddNode(jcrRegistry2.getRootNode(session2),
"SERVICE_HOST");
-//            service_host = serviceHost;
-//            session2.save();
-//
-
-        } catch (RepositoryException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
-        }  catch (RegistryException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
-        }
+//        } catch (RepositoryException e) {
+//            e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
+//        }  catch (RegistryException e) {
+//            e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
+//        }
     }
 
 

Modified: airavata/trunk/modules/commons/common-registry-api/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/common-registry-api/pom.xml?rev=1393172&r1=1393171&r2=1393172&view=diff
==============================================================================
--- airavata/trunk/modules/commons/common-registry-api/pom.xml (original)
+++ airavata/trunk/modules/commons/common-registry-api/pom.xml Tue Oct  2 20:46:23 2012
@@ -46,18 +46,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-core</artifactId>
-            <version>${jackrabbit.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-jcr-rmi</artifactId>
-            <version>${jackrabbit.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-common-utils</artifactId>
             <version>${project.version}</version>

Modified: airavata/trunk/modules/commons/provenance-registry/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/provenance-registry/pom.xml?rev=1393172&r1=1393171&r2=1393172&view=diff
==============================================================================
--- airavata/trunk/modules/commons/provenance-registry/pom.xml (original)
+++ airavata/trunk/modules/commons/provenance-registry/pom.xml Tue Oct  2 20:46:23 2012
@@ -55,18 +55,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-core</artifactId>
-            <version>${jackrabbit.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-jcr-rmi</artifactId>
-            <version>${jackrabbit.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-common-registry-api</artifactId>
             <version>${project.version}</version>

Modified: airavata/trunk/modules/commons/registry-api/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/registry-api/pom.xml?rev=1393172&r1=1393171&r2=1393172&view=diff
==============================================================================
--- airavata/trunk/modules/commons/registry-api/pom.xml (original)
+++ airavata/trunk/modules/commons/registry-api/pom.xml Tue Oct  2 20:46:23 2012
@@ -60,18 +60,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-core</artifactId>
-            <version>${jackrabbit.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-jcr-rmi</artifactId>
-            <version>${jackrabbit.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-common-registry-api</artifactId>
             <version>${project.version}</version>

Modified: airavata/trunk/modules/distribution/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/distribution/pom.xml?rev=1393172&r1=1393171&r2=1393172&view=diff
==============================================================================
--- airavata/trunk/modules/distribution/pom.xml (original)
+++ airavata/trunk/modules/distribution/pom.xml Tue Oct  2 20:46:23 2012
@@ -133,56 +133,11 @@
             <version>${derby.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-api</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-core</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-jcr-commons</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-jcr-rmi</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-jcr-server</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
             <groupId>xsul5-ogce</groupId>
             <artifactId>xsul5-2007-02-27</artifactId>
             <version>1</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-jcr-servlet</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-spi</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-spi-commons</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-standalone</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>log4j-over-slf4j</artifactId>
             <version>${org.slf4j.version}</version>

Modified: airavata/trunk/modules/gfac-core/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/pom.xml?rev=1393172&r1=1393171&r2=1393172&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/pom.xml (original)
+++ airavata/trunk/modules/gfac-core/pom.xml Tue Oct  2 20:46:23 2012
@@ -124,16 +124,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-core</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-jcr-rmi</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-common-registry-api</artifactId>
             <version>${project.version}</version>

Modified: airavata/trunk/modules/test-suite/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/test-suite/pom.xml?rev=1393172&r1=1393171&r2=1393172&view=diff
==============================================================================
--- airavata/trunk/modules/test-suite/pom.xml (original)
+++ airavata/trunk/modules/test-suite/pom.xml Tue Oct  2 20:46:23 2012
@@ -119,16 +119,6 @@
             <artifactId>slf4j-simple</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-core</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-jcr-rmi</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
     </dependencies>
 
     <build>

Modified: airavata/trunk/modules/workflow-model/workflow-model-core/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/workflow-model/workflow-model-core/pom.xml?rev=1393172&r1=1393171&r2=1393172&view=diff
==============================================================================
--- airavata/trunk/modules/workflow-model/workflow-model-core/pom.xml (original)
+++ airavata/trunk/modules/workflow-model/workflow-model-core/pom.xml Tue Oct  2 20:46:23
2012
@@ -278,16 +278,6 @@
             <version>${jcr.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-core</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-jcr-rmi</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
             <groupId>globus</groupId>
             <artifactId>transfer-api-client</artifactId>
             <version>0.10</version>

Modified: airavata/trunk/modules/xbaya-gui/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/pom.xml?rev=1393172&r1=1393171&r2=1393172&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/pom.xml (original)
+++ airavata/trunk/modules/xbaya-gui/pom.xml Tue Oct  2 20:46:23 2012
@@ -41,11 +41,11 @@
                 <!-- Deployment Information -->
                 <jnlpURLPrefix>http://localhost/airavata-xbaya</jnlpURLPrefix>
                 <jnlpFileName>xbaya.jnlp</jnlpFileName>
-
+		<!--
                 <registryEPR>
                     http://localhost:8090/jackrabbit-webapp-2.4.0/rmi
                 </registryEPR>
-
+		-->
             </properties>
         </profile>
 
@@ -383,16 +383,6 @@
             <version>${jcr.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-core</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-jcr-rmi</artifactId>
-            <version>${jackrabbit.version}</version>
-        </dependency>
-        <dependency>
             <groupId>globus</groupId>
             <artifactId>transfer-api-client</artifactId>
             <version>0.10</version>

Modified: airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/SimpleInvoker.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/SimpleInvoker.java?rev=1393172&r1=1393171&r2=1393172&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/SimpleInvoker.java
(original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/SimpleInvoker.java
Tue Oct  2 20:46:23 2012
@@ -25,7 +25,6 @@ import java.util.Iterator;
 
 import org.apache.airavata.common.utils.XMLUtil;
 import org.apache.airavata.workflow.model.exceptions.WorkflowException;
-import org.apache.jackrabbit.core.cache.ConcurrentCache;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xmlpull.v1.builder.XmlElement;

Modified: airavata/trunk/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/RegistryServiceTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/RegistryServiceTest.java?rev=1393172&r1=1393171&r2=1393172&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/RegistryServiceTest.java
(original)
+++ airavata/trunk/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/RegistryServiceTest.java
Tue Oct  2 20:46:23 2012
@@ -22,16 +22,10 @@
 package org.apache.airavata.xbaya.interpreter;
 
 import org.apache.airavata.common.registry.api.exception.RegistryException;
-import org.apache.airavata.common.utils.IOUtil;
 import org.apache.airavata.commons.gfac.type.ApplicationDeploymentDescription;
 import org.apache.airavata.commons.gfac.type.HostDescription;
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
-import org.apache.airavata.registry.api.exception.ServiceDescriptionRetrieveException;
-import org.apache.airavata.registry.api.impl.AiravataJCRRegistry;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
-import org.apache.airavata.schemas.gfac.InputParameterType;
-import org.apache.airavata.schemas.gfac.OutputParameterType;
-import org.apache.airavata.schemas.gfac.StringParameterType;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
@@ -42,155 +36,70 @@ import org.junit.rules.TestWatchman;
 import org.junit.runners.model.FrameworkMethod;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+//FIXME: Add tests for new registry. Airavata-592
+public class RegistryServiceTest {
+	@Rule
+	public ExpectedException exception = ExpectedException.none();
 
-import javax.jcr.RepositoryException;
-import javax.xml.bind.SchemaOutputResolver;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+	@Rule
+	public MethodRule watchman = new TestWatchman() {
+		public void starting(FrameworkMethod method) {
+			logger.info("{} being run...", method.getName());
+		}
+	};
+
+	final Logger logger = LoggerFactory.getLogger(RegistryServiceTest.class);
+
+	@Before
+	public void testExecute() throws RegistryException {
+
+	}
+
+	@After
+	public void cleanup() throws RegistryException {
+	}
+
+	private HostDescription createHostDescription() {
+		HostDescription host = new HostDescription();
+		host.getType().setHostName("localhost");
+		host.getType().setHostAddress("localhost");
+		return host;
+	}
+
+	private ServiceDescription createServiceDescription() {
+		ServiceDescription serv = new ServiceDescription();
+		serv.getType().setName("SimpleEcho");
+		return serv;
+	}
+
+	private ApplicationDeploymentDescription createAppDeploymentDescription() {
+		ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription();
+		ApplicationDeploymentDescriptionType app = appDesc.getType();
+		ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory
+				.newInstance();
+		name.setStringValue("EchoLocal");
+		app.setApplicationName(name);
+		app.setExecutableLocation("/bin/echo");
+		app.setScratchWorkingDirectory("/tmp");
+		app.setStaticWorkingDirectory("/tmp");
+		app.setInputDataDirectory("/tmp/input");
+		app.setOutputDataDirectory("/tmp/output");
+		app.setStandardOutput("/tmp/echo.stdout");
+		app.setStandardError("/tmp/echo.stdout");
+		return appDesc;
+	}
+
+	@Test
+	public void getFromRegistry() throws RegistryException {
+	}
+
+	@Test
+	public void searchRegistry() throws RegistryException {
+	}
 
-import static org.junit.Assert.*;
+	@Test
+	public void deleteFromRegistry() throws RegistryException {
 
-public class RegistryServiceTest {
-    @Rule
-    public ExpectedException exception = ExpectedException.none();
+	}
 
-    @Rule
-    public MethodRule watchman = new TestWatchman() {
-        public void starting(FrameworkMethod method) {
-            logger.info("{} being run...", method.getName());
-        }
-    };
-
-    final Logger logger = LoggerFactory.getLogger(RegistryServiceTest.class);
-
-    public AiravataJCRRegistry jcrRegistry = null;
-
-    @Before
-    public void testExecute() throws RegistryException {
-        logger.info("Running RegistryServiceTest...");
-        try {
-            Map<String,String> config = new HashMap<String,String>();
-            config.put("org.apache.jackrabbit.repository.home","target");
-            jcrRegistry = new AiravataJCRRegistry(null, "org.apache.jackrabbit.core.RepositoryFactoryImpl",
"admin", "admin",
-                    config);
-        } catch (RegistryException e) {
-            fail("Failed creating the JCR Registry");
-        }
-
-        HostDescription host = createHostDescription();
-        ApplicationDeploymentDescription appDesc = createAppDeploymentDescription();
-        ServiceDescription serv = createServiceDescription();
-
-        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
-        InputParameterType input = InputParameterType.Factory.newInstance();
-        input.setParameterName("echo_input");
-        input.setParameterType(StringParameterType.Factory.newInstance());
-        inputList.add(input);
-        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
-
-        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
-        OutputParameterType output = OutputParameterType.Factory.newInstance();
-        output.setParameterName("echo_output");
-        input.setParameterType(StringParameterType.Factory.newInstance());
-        outputList.add(output);
-        OutputParameterType[] outputParamList = outputList.toArray(new OutputParameterType[outputList.size()]);
-
-        serv.getType().setInputParametersArray(inputParamList);
-        serv.getType().setOutputParametersArray(outputParamList);
-
-        jcrRegistry.saveHostDescription(host);
-        jcrRegistry.saveDeploymentDescription(serv.getType().getName(), host.getType().getHostName(),
appDesc);
-        jcrRegistry.saveServiceDescription(serv);
-        jcrRegistry.deployServiceOnHost(serv.getType().getName(), host.getType().getHostName());
-
-    }
-
-    private HostDescription createHostDescription() {
-        HostDescription host = new HostDescription();
-        host.getType().setHostName("localhost");
-        host.getType().setHostAddress("localhost");
-        return host;
-    }
-
-    private ServiceDescription createServiceDescription() {
-        ServiceDescription serv = new ServiceDescription();
-        serv.getType().setName("SimpleEcho");
-        return serv;
-    }
-
-    private ApplicationDeploymentDescription createAppDeploymentDescription() {
-        ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription();
-        ApplicationDeploymentDescriptionType app = appDesc.getType();
-        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory
-                .newInstance();
-        name.setStringValue("EchoLocal");
-        app.setApplicationName(name);
-        app.setExecutableLocation("/bin/echo");
-        app.setScratchWorkingDirectory("/tmp");
-        app.setStaticWorkingDirectory("/tmp");
-        app.setInputDataDirectory("/tmp/input");
-        app.setOutputDataDirectory("/tmp/output");
-        app.setStandardOutput("/tmp/echo.stdout");
-        app.setStandardError("/tmp/echo.stdout");
-        return appDesc;
-    }
-
-    @Test
-    public void getFromRegistry() throws RegistryException {
-        /* Checking the registry for the saved descriptors */
-//        exception.expect(ServiceDescriptionRetrieveException.class);
-        assertNotNull(jcrRegistry.getHostDescription("localhost"));
-        assertNull(jcrRegistry.getHostDescription("remotehost"));
-
-        assertNull(jcrRegistry.getDeploymentDescription("random1", "random2"));
-        assertNotNull(jcrRegistry.getServiceDescription("SimpleEcho"));
-        assertNull(jcrRegistry.getServiceDescription("dummyService"));
-    }
-
-    @Test
-    public void searchRegistry() throws RegistryException {
-        /* Searching the registry for descriptors */
-        assertNotNull(jcrRegistry.searchHostDescription("localhost"));
-        assertNotNull(jcrRegistry.searchDeploymentDescription("EchoLocal", "localhost"));
-        assertNotNull(jcrRegistry.searchServiceDescription("SimpleEcho"));
-    }
-
-    @Test
-    public void deleteFromRegistry() throws RegistryException {
-        /* Deleting the descriptors from the registry */
-        jcrRegistry.deleteHostDescription("localhost");
-        assertNull(jcrRegistry.getHostDescription("localhost"));
-        assertNull(jcrRegistry.getHostDescription("remotehost"));
-
-        jcrRegistry.deleteDeploymentDescription("SimpleEcho", "localhost", "EchoLocal");
-        try {
-            assertNull(jcrRegistry.getDeploymentDescription("EchoLocal", "localhost"));
-        } catch (Exception e) {
-            assertTrue(true);
-        }
-        try {
-        assertNull(jcrRegistry.getDeploymentDescription("EchoLocal", "remotehost"));
-        } catch (Exception e) {
-            assertTrue(true);
-        }
-        jcrRegistry.deleteServiceDescription("SimpleEcho");
-        try {
-            assertNull(jcrRegistry.getServiceDescription("SimpleEcho"));
-        } catch (Exception e) {
-            assertTrue(true);
-        }
-    }
-
-    @After
-    public void cleanup()throws  RegistryException{
-        try {
-            jcrRegistry.getSession().logout();
-        } catch (RepositoryException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
-        }
-        IOUtil.deleteDirectory(new File((new File(".")).getAbsolutePath() + File.separator
+ "target"));
-    }
 }

Modified: airavata/trunk/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/pom.xml?rev=1393172&r1=1393171&r2=1393172&view=diff
==============================================================================
--- airavata/trunk/pom.xml (original)
+++ airavata/trunk/pom.xml Tue Oct  2 20:46:23 2012
@@ -67,7 +67,6 @@
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <axis2.version>1.5.1</axis2.version>
         <derby.version>10.9.1.0</derby.version>
-        <jackrabbit.version>2.2.7</jackrabbit.version>
         <logback.version>0.9.20</logback.version>
         <org.slf4j.version>1.6.1</org.slf4j.version>
         <log4j.version>1.2.16</log4j.version>



Mime
View raw message