You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2014/02/13 20:39:30 UTC

git commit: Adding more test cases to fix AIRAVATA-1011

Updated Branches:
  refs/heads/master 11191ef46 -> f52dc3b71


Adding more test cases to fix AIRAVATA-1011


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/f52dc3b7
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f52dc3b7
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f52dc3b7

Branch: refs/heads/master
Commit: f52dc3b719a93625a8bf0701ae5d0facf4c148a2
Parents: 11191ef
Author: lahiru <la...@apache.org>
Authored: Thu Feb 13 14:39:22 2014 -0500
Committer: lahiru <la...@apache.org>
Committed: Thu Feb 13 14:39:22 2014 -0500

----------------------------------------------------------------------
 .../core/impl/EmbeddedGFACJobSubmitter.java     |   8 +-
 .../cpi/impl/SimpleOrchestratorImpl.java        |   1 +
 .../core/AbstractOrchestratorTest.java          |  65 ----
 .../orchestrator/core/BaseOrchestratorTest.java |  98 ++++++
 .../orchestrator/core/DocumentCreator.java      | 323 +++++++++++++++++++
 .../orchestrator/core/NewOrchestratorTest.java  |  62 +---
 .../core/OrchestratorTestWithGRAM.java          | 101 ++++++
 .../core/OrchestratorTestWithGSISSH.java        | 101 ++++++
 8 files changed, 629 insertions(+), 130 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/f52dc3b7/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
index f7dc0cd..63bef69 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
@@ -58,7 +58,7 @@ public class EmbeddedGFACJobSubmitter implements JobSubmitter {
         for (int i = 0; i < experimentIDList.size(); i++) {
             try {
                 // once its fetched it's status will changed to fetched state
-                launchGfacWithJobRequest(experimentIDList.get(i));
+                launchGfacWithExperimentID(experimentIDList.get(i));
             } catch (Exception e) {
                 logger.error("Error getting job related information");
                 throw new OrchestratorException(e);
@@ -68,8 +68,8 @@ public class EmbeddedGFACJobSubmitter implements JobSubmitter {
     }
 
     //FIXME: (MEP) This method is pretty gruesome.  If we really expect multiple implementations of the JobSubmitter
-    // interface and at least some of them will need to do the stuff in this method, then we need a parent class GenericJobSubmitterImpl.java (maybe abstract) that includes launchGfacWithJobRequest() so that subclasses can inherit it.
-    private void launchGfacWithJobRequest(String experimentID) throws OrchestratorException {
+    // interface and at least some of them will need to do the stuff in this method, then we need a parent class GenericJobSubmitterImpl.java (maybe abstract) that includes launchGfacWithExperimentID() so that subclasses can inherit it.
+    private void launchGfacWithExperimentID(String experimentID) throws OrchestratorException {
         Registry newRegistry = orchestratorContext.getNewRegistry();
         try {
             //todo init this during submitter init
@@ -85,7 +85,7 @@ public class EmbeddedGFACJobSubmitter implements JobSubmitter {
 
     public boolean directJobSubmit(String experimentID) throws OrchestratorException {
         try {
-            launchGfacWithJobRequest(experimentID);
+            launchGfacWithExperimentID(experimentID);
         } catch (Exception e) {
             String error = "Error launching the job : " + experimentID;
             logger.error(error);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f52dc3b7/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
index dbc3c28..25b0a04 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
@@ -72,6 +72,7 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator {
 
     public boolean launchExperiment(String experimentID) throws OrchestratorException {
         // we give higher priority to userExperimentID
+        //todo support multiple validators
         if (this.orchestratorConfiguration.isEnableValidation()) {
             if(jobMetadataValidator.validate(experimentID)){
                 logger.info("validation Successful for the experiment: " +  experimentID);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f52dc3b7/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/AbstractOrchestratorTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/AbstractOrchestratorTest.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/AbstractOrchestratorTest.java
deleted file mode 100644
index 87ad701..0000000
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/AbstractOrchestratorTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * 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.
- *
-*/
-package org.apache.airavata.orchestrator.core;
-
-
-import org.apache.airavata.orchestrator.core.util.Initialize;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.resources.*;
-
-public class AbstractOrchestratorTest {
-
-    private GatewayResource gatewayResource;
-    private WorkerResource workerResource;
-    private UserResource userResource;
-    private OrchestratorDataResource orchestratorDataResource;
-    private Initialize initialize;
-
-    public void setUp() throws Exception {
-        initialize = new Initialize("airavata-registry-derby.sql");
-        initialize.initializeDB();
-        gatewayResource = (GatewayResource) ResourceUtils.getGateway("default");
-        workerResource = (WorkerResource) ResourceUtils.getWorker(gatewayResource.getGatewayName(), "admin");
-        userResource = (UserResource) gatewayResource.create(ResourceType.USER);
-        orchestratorDataResource = (OrchestratorDataResource) gatewayResource.create(ResourceType.ORCHESTRATOR);
-        userResource.setUserName("admin");
-        userResource.setPassword("admin");
-    }
-
-    public void tearDown() throws Exception {
-        initialize.stopDerbyServer();
-    }
-
-    public GatewayResource getGatewayResource() {
-        return gatewayResource;
-    }
-
-    public WorkerResource getWorkerResource() {
-        return workerResource;
-    }
-
-    public UserResource getUserResource() {
-        return userResource;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f52dc3b7/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
new file mode 100644
index 0000000..b3ec514
--- /dev/null
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
@@ -0,0 +1,98 @@
+/*
+ *
+ * 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.
+ *
+*/
+package org.apache.airavata.orchestrator.core;
+
+
+import org.apache.airavata.client.AiravataAPIFactory;
+import org.apache.airavata.client.api.AiravataAPI;
+import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.orchestrator.core.util.Initialize;
+import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
+import org.apache.airavata.persistance.registry.jpa.resources.*;
+
+public class BaseOrchestratorTest {
+
+    private GatewayResource gatewayResource;
+    private WorkerResource workerResource;
+    private UserResource userResource;
+    private OrchestratorDataResource orchestratorDataResource;
+    private Initialize initialize;
+    private DocumentCreator documentCreator;
+
+    public void setUp() throws Exception {
+        initialize = new Initialize("airavata-registry-derby.sql");
+        initialize.initializeDB();
+        gatewayResource = (GatewayResource) ResourceUtils.getGateway("default");
+        workerResource = (WorkerResource) ResourceUtils.getWorker(gatewayResource.getGatewayName(), "admin");
+        userResource = (UserResource) gatewayResource.create(ResourceType.USER);
+        orchestratorDataResource = (OrchestratorDataResource) gatewayResource.create(ResourceType.ORCHESTRATOR);
+        userResource.setUserName("admin");
+        userResource.setPassword("admin");
+
+        documentCreator = new DocumentCreator(getAiravataAPI());
+        documentCreator.createLocalHostDocs();
+        documentCreator.createGramDocs();
+        documentCreator.createGSISSHDocs();
+    }
+
+    public void tearDown() throws Exception {
+        initialize.stopDerbyServer();
+    }
+
+    public GatewayResource getGatewayResource() {
+        return gatewayResource;
+    }
+
+    public WorkerResource getWorkerResource() {
+        return workerResource;
+    }
+
+    public UserResource getUserResource() {
+        return userResource;
+    }
+
+    private AiravataAPI getAiravataAPI() {
+        AiravataAPI airavataAPI = null;
+        if (airavataAPI == null) {
+            try {
+                String systemUserName = ServerSettings.getSystemUser();
+                String gateway = ServerSettings.getSystemUserGateway();
+                airavataAPI = AiravataAPIFactory.getAPI(gateway, systemUserName);
+            } catch (ApplicationSettingsException e) {
+                e.printStackTrace();
+            } catch (AiravataAPIInvocationException e) {
+                e.printStackTrace();
+            }
+        }
+        return airavataAPI;
+    }
+
+    public DocumentCreator getDocumentCreator() {
+        return documentCreator;
+    }
+
+    public void setDocumentCreator(DocumentCreator documentCreator) {
+        this.documentCreator = documentCreator;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f52dc3b7/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/DocumentCreator.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/DocumentCreator.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/DocumentCreator.java
new file mode 100644
index 0000000..037b1e8
--- /dev/null
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/DocumentCreator.java
@@ -0,0 +1,323 @@
+/*
+ *
+ * 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.
+ *
+*/
+package org.apache.airavata.orchestrator.core;
+
+import org.apache.airavata.client.api.AiravataAPI;
+import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
+import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+import org.apache.airavata.commons.gfac.type.HostDescription;
+import org.apache.airavata.commons.gfac.type.ServiceDescription;
+import org.apache.airavata.schemas.gfac.*;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+public class DocumentCreator {
+
+    private AiravataAPI airavataAPI = null;
+    private String hpcHostAddress = "trestles.sdsc.edu";
+    private String gramHostName = "gram-trestles";
+    private String gsiSshHostName = "gsissh-trestles";
+    private String gridftpAddress = "gsiftp://trestles.sdsc.edu:2811/";
+    private String gramAddress = "trestles-login2.sdsc.edu:2119/jobmanager-pbstest2";
+
+
+    public DocumentCreator(AiravataAPI airavataAPI) {
+        this.airavataAPI = airavataAPI;
+    }
+
+    public void createLocalHostDocs() {
+        HostDescription descriptor = new HostDescription();
+        descriptor.getType().setHostName("localhost");
+        descriptor.getType().setHostAddress("127.0.0.1");
+        try {
+            airavataAPI.getApplicationManager().saveHostDescription(descriptor);
+        } catch (AiravataAPIInvocationException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+
+        ServiceDescription serviceDescription = new ServiceDescription();
+        List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
+        List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
+        serviceDescription.getType().setName("Echo");
+        serviceDescription.getType().setDescription("Echo service");
+        // Creating input parameters
+        InputParameterType parameter = InputParameterType.Factory.newInstance();
+        parameter.setParameterName("echo_input");
+        parameter.setParameterDescription("echo input");
+        ParameterType parameterType = parameter.addNewParameterType();
+        parameterType.setType(DataType.STRING);
+        parameterType.setName("String");
+        inputParameters.add(parameter);
+
+        // Creating output parameters
+        OutputParameterType outputParameter = OutputParameterType.Factory.newInstance();
+        outputParameter.setParameterName("echo_output");
+        outputParameter.setParameterDescription("Echo output");
+        ParameterType outputParaType = outputParameter.addNewParameterType();
+        outputParaType.setType(DataType.STRING);
+        outputParaType.setName("String");
+        outputParameters.add(outputParameter);
+
+        // Setting input and output parameters to serviceDescriptor
+        serviceDescription.getType().setInputParametersArray(inputParameters.toArray(new InputParameterType[]{}));
+        serviceDescription.getType().setOutputParametersArray(outputParameters.toArray(new OutputParameterType[]{}));
+
+        try {
+            airavataAPI.getApplicationManager().saveServiceDescription(serviceDescription);
+        } catch (AiravataAPIInvocationException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+
+        ApplicationDescription applicationDeploymentDescription = new ApplicationDescription();
+        ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType = applicationDeploymentDescription
+                .getType();
+        applicationDeploymentDescriptionType.addNewApplicationName().setStringValue("EchoApplication");
+        applicationDeploymentDescriptionType.setExecutableLocation("/bin/echo");
+        applicationDeploymentDescriptionType.setScratchWorkingDirectory("/tmp");
+
+        try {
+            airavataAPI.getApplicationManager().saveApplicationDescription("Echo", "localhost", applicationDeploymentDescription);
+        } catch (AiravataAPIInvocationException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+
+    }
+
+    public void createGramDocs() {
+        /*
+           creating host descriptor for gram
+        */
+        HostDescription host = new HostDescription(GlobusHostType.type);
+        host.getType().setHostAddress(hpcHostAddress);
+        host.getType().setHostName(gramHostName);
+        ((GlobusHostType) host.getType()).setGlobusGateKeeperEndPointArray(new String[]{gramAddress});
+        ((GlobusHostType) host.getType()).setGridFTPEndPointArray(new String[]{gridftpAddress});
+        try {
+            airavataAPI.getApplicationManager().saveHostDescription(host);
+        } catch (AiravataAPIInvocationException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+
+
+        /*
+        * Service Description creation and saving
+        */
+        String serviceName = "SimpleEcho1";
+        ServiceDescription serv = new ServiceDescription();
+        serv.getType().setName(serviceName);
+
+        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+
+        InputParameterType input = InputParameterType.Factory.newInstance();
+        input.setParameterName("echo_input");
+        input.setParameterType(StringParameterType.Factory.newInstance());
+        inputList.add(input);
+
+        InputParameterType input1 = InputParameterType.Factory.newInstance();
+        input.setParameterName("myinput");
+        URIParameterType uriType = URIParameterType.Factory.newInstance();
+        uriType.setValue("gsiftp://gridftp1.ls4.tacc.utexas.edu:2811//home1/01437/ogce/gram_20130215.log");
+        input.setParameterType(uriType);
+        inputList.add(input1);
+
+
+        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
+        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+        OutputParameterType output = OutputParameterType.Factory.newInstance();
+        output.setParameterName("echo_output");
+        output.setParameterType(StringParameterType.Factory.newInstance());
+        outputList.add(output);
+
+        OutputParameterType[] outputParamList = outputList
+                .toArray(new OutputParameterType[outputList.size()]);
+
+        serv.getType().setInputParametersArray(inputParamList);
+        serv.getType().setOutputParametersArray(outputParamList);
+        try {
+            airavataAPI.getApplicationManager().saveServiceDescription(serv);
+        } catch (AiravataAPIInvocationException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+
+        /*
+            Application descriptor creation and saving
+         */
+        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
+        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
+        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+        name.setStringValue("EchoLocal");
+        app.setApplicationName(name);
+        ProjectAccountType projectAccountType = app.addNewProjectAccount();
+        projectAccountType.setProjectAccountNumber("sds128");
+
+        QueueType queueType = app.addNewQueue();
+        queueType.setQueueName("development");
+
+        app.setCpuCount(1);
+        app.setJobType(JobTypeType.SERIAL);
+        app.setNodeCount(1);
+        app.setProcessorsPerNode(1);
+
+        /*
+           * Use bat file if it is compiled on Windows
+           */
+        app.setExecutableLocation("/bin/echo");
+
+        /*
+           * Default tmp location
+           */
+        String tempDir = "/scratch/01437/ogce/test/";
+        String date = (new Date()).toString();
+        date = date.replaceAll(" ", "_");
+        date = date.replaceAll(":", "_");
+
+        tempDir = tempDir + File.separator
+                + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
+
+        System.out.println(tempDir);
+        app.setScratchWorkingDirectory(tempDir);
+        app.setStaticWorkingDirectory(tempDir);
+        app.setInputDataDirectory(tempDir + File.separator + "inputData");
+        app.setOutputDataDirectory(tempDir + File.separator + "outputData");
+        app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stdout");
+        app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stderr");
+
+
+        try {
+            airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, gramHostName, appDesc);
+        } catch (AiravataAPIInvocationException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+    }
+
+    public void createGSISSHDocs() {
+        HostDescription host = new HostDescription(GsisshHostType.type);
+        host.getType().setHostAddress(hpcHostAddress);
+        host.getType().setHostName(gsiSshHostName);
+
+        try {
+            airavataAPI.getApplicationManager().saveHostDescription(host);
+        } catch (AiravataAPIInvocationException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+        /*
+        * Service Description creation and saving
+        */
+        String serviceName = "SimpleEcho2";
+        ServiceDescription serv = new ServiceDescription();
+        serv.getType().setName(serviceName);
+
+        List<InputParameterType> inputList = new ArrayList<InputParameterType>();
+
+        InputParameterType input = InputParameterType.Factory.newInstance();
+        input.setParameterName("echo_input");
+        input.setParameterType(StringParameterType.Factory.newInstance());
+        inputList.add(input);
+
+        InputParameterType input1 = InputParameterType.Factory.newInstance();
+        input.setParameterName("myinput");
+        URIParameterType uriType = URIParameterType.Factory.newInstance();
+        uriType.setValue("gsiftp://gridftp1.ls4.tacc.utexas.edu:2811//home1/01437/ogce/gram_20130215.log");
+        input.setParameterType(uriType);
+        inputList.add(input1);
+
+
+        InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList.size()]);
+        List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
+        OutputParameterType output = OutputParameterType.Factory.newInstance();
+        output.setParameterName("echo_output");
+        output.setParameterType(StringParameterType.Factory.newInstance());
+        outputList.add(output);
+
+        OutputParameterType[] outputParamList = outputList
+                .toArray(new OutputParameterType[outputList.size()]);
+
+        serv.getType().setInputParametersArray(inputParamList);
+        serv.getType().setOutputParametersArray(outputParamList);
+        try {
+            airavataAPI.getApplicationManager().saveServiceDescription(serv);
+        } catch (AiravataAPIInvocationException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+
+        /*
+            Application descriptor creation and saving
+         */
+        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
+        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
+        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
+        name.setStringValue("EchoLocal");
+        app.setApplicationName(name);
+        ProjectAccountType projectAccountType = app.addNewProjectAccount();
+        projectAccountType.setProjectAccountNumber("sds128");
+
+        QueueType queueType = app.addNewQueue();
+        queueType.setQueueName("development");
+
+        app.setCpuCount(1);
+        app.setJobType(JobTypeType.SERIAL);
+        app.setNodeCount(1);
+        app.setProcessorsPerNode(1);
+
+        /*
+           * Use bat file if it is compiled on Windows
+           */
+        app.setExecutableLocation("/bin/echo");
+
+        /*
+           * Default tmp location
+           */
+        String tempDir = "/scratch/01437/ogce/test/";
+        String date = (new Date()).toString();
+        date = date.replaceAll(" ", "_");
+        date = date.replaceAll(":", "_");
+
+        tempDir = tempDir + File.separator
+                + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
+
+        System.out.println(tempDir);
+        app.setScratchWorkingDirectory(tempDir);
+        app.setStaticWorkingDirectory(tempDir);
+        app.setInputDataDirectory(tempDir + File.separator + "inputData");
+        app.setOutputDataDirectory(tempDir + File.separator + "outputData");
+        app.setStandardOutput(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stdout");
+        app.setStandardError(tempDir + File.separator + app.getApplicationName().getStringValue() + ".stderr");
+
+
+        try {
+            airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, gramHostName, appDesc);
+        } catch (AiravataAPIInvocationException e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+    }
+
+    public AiravataAPI getAiravataAPI() {
+        return airavataAPI;
+    }
+
+    public void setAiravataAPI(AiravataAPI airavataAPI) {
+        this.airavataAPI = airavataAPI;
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f52dc3b7/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
index 0bed552..e14d1e4 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/NewOrchestratorTest.java
@@ -27,9 +27,6 @@ import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.commons.gfac.type.ApplicationDescription;
-import org.apache.airavata.commons.gfac.type.HostDescription;
-import org.apache.airavata.commons.gfac.type.ServiceDescription;
 import org.apache.airavata.model.experiment.*;
 import org.apache.airavata.orchestrator.cpi.Orchestrator;
 import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl;
@@ -37,17 +34,14 @@ import org.apache.airavata.persistance.registry.jpa.impl.RegistryImpl;
 import org.apache.airavata.registry.cpi.ChildDataType;
 import org.apache.airavata.registry.cpi.ParentDataType;
 import org.apache.airavata.registry.cpi.Registry;
-import org.apache.airavata.schemas.gfac.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.List;
 
-public class NewOrchestratorTest extends AbstractOrchestratorTest {
+public class NewOrchestratorTest extends BaseOrchestratorTest {
     private static final Logger log = LoggerFactory.getLogger(NewOrchestratorTest.class);
 
     private Orchestrator orchestrator;
@@ -63,60 +57,6 @@ public class NewOrchestratorTest extends AbstractOrchestratorTest {
 
     private void createJobRequestWithDocuments(AiravataAPI airavataAPI) {
         // creating host description
-        HostDescription descriptor = new HostDescription();
-        descriptor.getType().setHostName("localhost");
-        descriptor.getType().setHostAddress("127.0.0.1");
-        try {
-            airavataAPI.getApplicationManager().saveHostDescription(descriptor);
-        } catch (AiravataAPIInvocationException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-
-        ServiceDescription serviceDescription = new ServiceDescription();
-        List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
-        List<OutputParameterType> outputParameters = new ArrayList<OutputParameterType>();
-        serviceDescription.getType().setName("Echo");
-        serviceDescription.getType().setDescription("Echo service");
-        // Creating input parameters
-        InputParameterType parameter = InputParameterType.Factory.newInstance();
-        parameter.setParameterName("echo_input");
-        parameter.setParameterDescription("echo input");
-        ParameterType parameterType = parameter.addNewParameterType();
-        parameterType.setType(DataType.STRING);
-        parameterType.setName("String");
-        inputParameters.add(parameter);
-
-        // Creating output parameters
-        OutputParameterType outputParameter = OutputParameterType.Factory.newInstance();
-        outputParameter.setParameterName("echo_output");
-        outputParameter.setParameterDescription("Echo output");
-        ParameterType outputParaType = outputParameter.addNewParameterType();
-        outputParaType.setType(DataType.STRING);
-        outputParaType.setName("String");
-        outputParameters.add(outputParameter);
-
-        // Setting input and output parameters to serviceDescriptor
-        serviceDescription.getType().setInputParametersArray(inputParameters.toArray(new InputParameterType[]{}));
-        serviceDescription.getType().setOutputParametersArray(outputParameters.toArray(new OutputParameterType[]{}));
-
-        try {
-            airavataAPI.getApplicationManager().saveServiceDescription(serviceDescription);
-        } catch (AiravataAPIInvocationException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
-
-        ApplicationDescription applicationDeploymentDescription = new ApplicationDescription();
-        ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType = applicationDeploymentDescription
-                .getType();
-        applicationDeploymentDescriptionType.addNewApplicationName().setStringValue("EchoApplication");
-        applicationDeploymentDescriptionType.setExecutableLocation("/bin/echo");
-        applicationDeploymentDescriptionType.setScratchWorkingDirectory("/tmp");
-
-        try {
-            airavataAPI.getApplicationManager().saveApplicationDescription("Echo", "localhost", applicationDeploymentDescription);
-        } catch (AiravataAPIInvocationException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
-        }
 
         //Using new airavata-api methods to store experiment metadata
         BasicMetadata basicMetadata = new BasicMetadata();

http://git-wip-us.apache.org/repos/asf/airavata/blob/f52dc3b7/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
new file mode 100644
index 0000000..7147cab
--- /dev/null
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGRAM.java
@@ -0,0 +1,101 @@
+/*
+ *
+ * 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.
+ *
+*/
+package org.apache.airavata.orchestrator.core;
+
+import org.apache.airavata.client.api.AiravataAPI;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.model.experiment.*;
+import org.apache.airavata.orchestrator.cpi.Orchestrator;
+import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl;
+import org.apache.airavata.persistance.registry.jpa.impl.RegistryImpl;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.apache.airavata.registry.cpi.ParentDataType;
+import org.apache.airavata.registry.cpi.Registry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+import java.util.*;
+
+public class OrchestratorTestWithGRAM extends BaseOrchestratorTest {
+    private static final Logger log = LoggerFactory.getLogger(NewOrchestratorTest.class);
+
+    private Orchestrator orchestrator;
+    private String experimentID;
+
+    @BeforeTest
+    public void setUp() throws Exception {
+        AiravataUtils.setExecutionAsServer();
+        super.setUp();
+        orchestrator = new SimpleOrchestratorImpl();
+        createJobRequestWithDocuments(super.getDocumentCreator().getAiravataAPI());
+    }
+
+    private void createJobRequestWithDocuments(AiravataAPI airavataAPI) {
+
+
+        //Using new airavata-api methods to store experiment metadata
+        BasicMetadata basicMetadata = new BasicMetadata();
+        basicMetadata.setExperimentName("test-trestles");
+        basicMetadata.setUserName("admin");
+        basicMetadata.setUserNameIsSet(true);
+        basicMetadata.setProjectID("default");
+
+        AdvancedInputDataHandling advancedInputDataHandling = new AdvancedInputDataHandling();
+        AdvancedOutputDataHandling advancedOutputDataHandling = new AdvancedOutputDataHandling();
+        ComputationalResourceScheduling computationalResourceScheduling = new ComputationalResourceScheduling();
+        QualityOfServiceParams qualityOfServiceParams = new QualityOfServiceParams();
+        ConfigurationData configurationData = new ConfigurationData();
+
+        HashMap<String, String> exInputs = new HashMap<String, String>();
+        exInputs.put("echo_input", "echo_output=hello");
+        exInputs.put("copy_input", "file:///tmp/tmpstrace");
+        exInputs.put("outputlocation", "./outputData/.");
+
+        configurationData.setExperimentInputs(exInputs);
+        configurationData.setAdvanceInputDataHandling(advancedInputDataHandling);
+        configurationData.setAdvanceOutputDataHandling(advancedOutputDataHandling);
+        configurationData.setComputationalResourceScheduling(computationalResourceScheduling);
+        configurationData.setQosParams(qualityOfServiceParams);
+        configurationData.setApplicationId("SimpleEcho1");
+
+        Registry registry = new RegistryImpl();
+        experimentID = (String) registry.add(ParentDataType.EXPERIMENT_BASIC_DATA, basicMetadata);
+        registry.add(ChildDataType.EXPERIMENT_CONFIGURATION_DATA, configurationData, experimentID);
+    }
+
+    @Test
+    public void noDescriptorTest() throws Exception {
+
+//        boolean b = orchestrator.launchExperiment(experimentID);
+
+//        if (b) {
+//            This means orchestrator successfully accepted the job
+//            Assert.assertTrue(true);
+//        } else {
+//            Assert.assertFalse(true);
+//        }
+    }
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/f52dc3b7/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGSISSH.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGSISSH.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGSISSH.java
new file mode 100644
index 0000000..ae91978
--- /dev/null
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithGSISSH.java
@@ -0,0 +1,101 @@
+/*
+ *
+ * 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.
+ *
+*/
+package org.apache.airavata.orchestrator.core;
+
+import org.apache.airavata.client.api.AiravataAPI;
+import org.apache.airavata.common.utils.AiravataUtils;
+import org.apache.airavata.model.experiment.*;
+import org.apache.airavata.orchestrator.cpi.Orchestrator;
+import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl;
+import org.apache.airavata.persistance.registry.jpa.impl.RegistryImpl;
+import org.apache.airavata.registry.cpi.ChildDataType;
+import org.apache.airavata.registry.cpi.ParentDataType;
+import org.apache.airavata.registry.cpi.Registry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+import java.util.HashMap;
+
+public class OrchestratorTestWithGSISSH extends BaseOrchestratorTest {
+    private static final Logger log = LoggerFactory.getLogger(NewOrchestratorTest.class);
+
+     private Orchestrator orchestrator;
+
+     private String experimentID;
+
+     @BeforeTest
+     public void setUp() throws Exception {
+         AiravataUtils.setExecutionAsServer();
+         super.setUp();
+         orchestrator = new SimpleOrchestratorImpl();
+         createJobRequestWithDocuments(super.getDocumentCreator().getAiravataAPI());
+     }
+
+     private void createJobRequestWithDocuments(AiravataAPI airavataAPI) {
+
+
+         //Using new airavata-api methods to store experiment metadata
+         BasicMetadata basicMetadata = new BasicMetadata();
+         basicMetadata.setExperimentName("test-trestles-gsissh");
+         basicMetadata.setUserName("admin");
+         basicMetadata.setUserNameIsSet(true);
+         basicMetadata.setProjectID("default");
+
+         AdvancedInputDataHandling advancedInputDataHandling = new AdvancedInputDataHandling();
+         AdvancedOutputDataHandling advancedOutputDataHandling = new AdvancedOutputDataHandling();
+         ComputationalResourceScheduling computationalResourceScheduling = new ComputationalResourceScheduling();
+         QualityOfServiceParams qualityOfServiceParams = new QualityOfServiceParams();
+         ConfigurationData configurationData = new ConfigurationData();
+
+         HashMap<String, String> exInputs = new HashMap<String, String>();
+         exInputs.put("echo_input", "echo_output=hello");
+         exInputs.put("copy_input", "file:///tmp/tmpstrace");
+         exInputs.put("outputlocation", "./outputData/.");
+
+         configurationData.setExperimentInputs(exInputs);
+         configurationData.setAdvanceInputDataHandling(advancedInputDataHandling);
+         configurationData.setAdvanceOutputDataHandling(advancedOutputDataHandling);
+         configurationData.setComputationalResourceScheduling(computationalResourceScheduling);
+         configurationData.setQosParams(qualityOfServiceParams);
+         configurationData.setApplicationId("SimpleEcho2");
+
+         Registry registry = new RegistryImpl();
+         experimentID = (String) registry.add(ParentDataType.EXPERIMENT_BASIC_DATA, basicMetadata);
+         registry.add(ChildDataType.EXPERIMENT_CONFIGURATION_DATA, configurationData, experimentID);
+     }
+
+     @Test
+     public void noDescriptorTest() throws Exception {
+
+//        boolean b = orchestrator.launchExperiment(experimentID);
+
+//        if (b) {
+//            This means orchestrator successfully accepted the job
+//            Assert.assertTrue(true);
+//        } else {
+//            Assert.assertFalse(true);
+//        }
+     }
+
+
+}