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/11 16:20:11 UTC

git commit: AIRAVATA-1011 - writing test cases for orchestrator cpi

Updated Branches:
  refs/heads/master 9b59fb000 -> 46352680c


AIRAVATA-1011 - writing test cases for orchestrator cpi


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

Branch: refs/heads/master
Commit: 46352680c202da613d654e49a1fbd54e1ddf385e
Parents: 9b59fb0
Author: lahiru <la...@apache.org>
Authored: Tue Feb 11 10:19:58 2014 -0500
Committer: lahiru <la...@apache.org>
Committed: Tue Feb 11 10:19:58 2014 -0500

----------------------------------------------------------------------
 .../core/impl/EmbeddedGFACJobSubmitter.java     |  32 ++--
 .../cpi/impl/AbstractOrchestrator.java          |   4 +
 .../orchestrator/core/NewOrchestratorTest.java  |   7 +-
 .../core/SimpleOrchestratorTest.java            | 167 -----------------
 .../core/TestWithStoredDescriptors.java         | 186 -------------------
 .../src/test/resources/orchestrator.properties  |   2 +-
 6 files changed, 24 insertions(+), 374 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/46352680/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 31e1bfa..cde97bd 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
@@ -87,24 +87,27 @@ public class EmbeddedGFACJobSubmitter implements JobSubmitter {
         return true;
     }
 
-	 //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.
+	 //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(JobRequest jobRequest) throws OrchestratorException {
-        String serviceName = jobRequest.getServiceName();
-        if(serviceName == null){
-            serviceName = jobRequest.getServiceDescription().getType().getName();
-        }
+        String experimentID = OrchestratorUtils.getUniqueID(jobRequest);
+        ConfigurationData configurationData = (ConfigurationData)
+                orchestratorContext.getNewRegistry().get(DataType.EXPERIMENT_CONFIGURATION_DATA, experimentID);
 
+        String serviceName = configurationData.getApplicationId();
+
+        if (serviceName == null) {
+            throw new OrchestratorException("Error executing the job because there is not Application Name in this Experiment");
+        }
 
         //todo submit the jobs
 
-        //after successfully submitting the jobs set the status of the job to submitted
-        String experimentID = OrchestratorUtils.getUniqueID(jobRequest);
         AiravataAPI airavataAPI = null;
         try {
 
             airavataAPI = orchestratorContext.getOrchestratorConfiguration().getAiravataAPI();
-				//FIXME: (MEP) Why do all of this validation here?  Is it needed?  Why would you get an empty job request?
-				//FIXME: (MEP) If you do need this, it should go into a utility class or something similar that does the validation.
+            //FIXME: (MEP) Why do all of this validation here?  Is it needed?  Why would you get an empty job request?
+            //FIXME: (MEP) If you do need this, it should go into a utility class or something similar that does the validation.
             HostDescription hostDescription = jobRequest.getHostDescription();
             if (hostDescription == null) {
                 List<HostDescription> registeredHosts = new ArrayList<HostDescription>();
@@ -129,11 +132,11 @@ public class EmbeddedGFACJobSubmitter implements JobSubmitter {
 
             ApplicationDescription applicationDescription = jobRequest.getApplicationDescription();
             if (applicationDescription == null) {
-                 applicationDescription = airavataAPI.getApplicationManager().getApplicationDescription(serviceName, hostDescription.getType().getHostName());
+                applicationDescription = airavataAPI.getApplicationManager().getApplicationDescription(serviceName, hostDescription.getType().getHostName());
             }
             // When we run getInParameters we set the actualParameter object, this has to be fixed
-				//FIXME: will these class loaders work correctly in Thrift?
-				//FIXME: gfac-config.xml is only under src/test.
+            //FIXME: will these class loaders work correctly in Thrift?
+            //FIXME: gfac-config.xml is only under src/test.
             URL resource = EmbeddedGFACJobSubmitter.class.getClassLoader().getResource("gfac-config.xml");
             Properties configurationProperties = ServerSettings.getProperties();
             GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), airavataAPI, configurationProperties);
@@ -151,7 +154,6 @@ public class EmbeddedGFACJobSubmitter implements JobSubmitter {
             jobExecutionContext.setApplicationContext(applicationContext);
 
 
-            ConfigurationData configurationData = (ConfigurationData) orchestratorContext.getNewRegistry().get(DataType.EXPERIMENT_CONFIGURATION_DATA, experimentID);
             Map<String, String> experimentInputs = configurationData.getExperimentInputs();
 
             jobExecutionContext.setInMessageContext(new MessageContext(OrchestratorUtils.getMessageContext(experimentInputs,
@@ -162,10 +164,10 @@ public class EmbeddedGFACJobSubmitter implements JobSubmitter {
 
             jobExecutionContext.setProperty(Constants.PROP_TOPIC, experimentID);
             jobExecutionContext.setExperimentID(experimentID);
-				//FIXME: (MEP) GFacAPI.submitJob() throws a GFacException that isn't caught here. You want to catch this before updating the registry.
+            //FIXME: (MEP) GFacAPI.submitJob() throws a GFacException that isn't caught here. You want to catch this before updating the registry.
             GFacAPI gfacAPI1 = new GFacAPI();
             gfacAPI1.submitJob(jobExecutionContext);
-				//FIXME: (MEP) It may be better to change the registry status in GFacAPI rather then here.
+            //FIXME: (MEP) It may be better to change the registry status in GFacAPI rather then here.
             orchestratorContext.getRegistry().changeStatus(experimentID, AiravataJobState.State.SUBMITTED);
         } catch (Exception e) {
             throw new OrchestratorException("Error launching the Job", e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/46352680/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
index 4c0fca3..5699559 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
@@ -42,6 +42,7 @@ import org.apache.airavata.orchestrator.core.model.ExperimentRequest;
 import org.apache.airavata.orchestrator.core.utils.OrchestratorConstants;
 import org.apache.airavata.orchestrator.core.utils.OrchestratorUtils;
 import org.apache.airavata.orchestrator.cpi.Orchestrator;
+import org.apache.airavata.persistance.registry.jpa.impl.RegistryImpl;
 import org.apache.airavata.registry.api.AiravataRegistry2;
 import org.apache.airavata.registry.api.AiravataRegistryFactory;
 import org.apache.airavata.registry.api.AiravataUser;
@@ -112,6 +113,9 @@ public abstract class AbstractOrchestrator implements Orchestrator {
             orchestratorContext.setOrchestratorConfiguration(orchestratorConfiguration);
             orchestratorConfiguration.setAiravataAPI(getAiravataAPI());
             orchestratorContext.setRegistry(airavataRegistry);
+
+            /* initializing registry cpi */
+            orchestratorContext.setNewRegistry(new RegistryImpl());
         } catch (RegistryException e) {
             logger.error("Failed to initializing Orchestrator");
             OrchestratorException orchestratorException = new OrchestratorException(e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/46352680/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 f10cd06..d37f7df 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,14 +27,11 @@ 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.ActualParameter;
 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.core.model.ExperimentRequest;
 import org.apache.airavata.orchestrator.cpi.Orchestrator;
-import org.apache.airavata.orchestrator.cpi.impl.AbstractOrchestrator;
 import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl;
 import org.apache.airavata.persistance.registry.jpa.impl.RegistryImpl;
 import org.apache.airavata.registry.api.JobRequest;
@@ -50,10 +47,9 @@ import org.testng.annotations.Test;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
-import java.util.UUID;
 
 public class NewOrchestratorTest extends AbstractOrchestratorTest{
-    private static final Logger log = LoggerFactory.getLogger(SimpleOrchestratorTest.class);
+    private static final Logger log = LoggerFactory.getLogger(NewOrchestratorTest.class);
 
        private Orchestrator orchestrator;
        private String experimentID;
@@ -145,6 +141,7 @@ public class NewOrchestratorTest extends AbstractOrchestratorTest{
            configurationData.setAdvanceOutputDataHandling(advancedOutputDataHandling);
            configurationData.setComputationalResourceScheduling(computationalResourceScheduling);
            configurationData.setQosParams(qualityOfServiceParams);
+           configurationData.setApplicationId("Echo");
 
            Registry registry = new RegistryImpl();
            experimentID = (String) registry.add(TopLevelDataType.EXPERIMENT_BASIC_DATA, basicMetadata);

http://git-wip-us.apache.org/repos/asf/airavata/blob/46352680/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorTest.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorTest.java
deleted file mode 100644
index b354b5b..0000000
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/SimpleOrchestratorTest.java
+++ /dev/null
@@ -1,167 +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 java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.UUID;
-
-import junit.framework.Assert;
-
-import org.apache.airavata.common.utils.AiravataUtils;
-import org.apache.airavata.commons.gfac.type.ActualParameter;
-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.orchestrator.core.model.ExperimentRequest;
-import org.apache.airavata.orchestrator.cpi.Orchestrator;
-import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl;
-import org.apache.airavata.registry.api.JobRequest;
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
-import org.apache.airavata.schemas.gfac.DataType;
-import org.apache.airavata.schemas.gfac.InputParameterType;
-import org.apache.airavata.schemas.gfac.OutputParameterType;
-import org.apache.airavata.schemas.gfac.ParameterType;
-import org.apache.airavata.schemas.gfac.StringParameterType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-public class SimpleOrchestratorTest extends AbstractOrchestratorTest {
-    private static final Logger log = LoggerFactory.getLogger(SimpleOrchestratorTest.class);
-
-    private Orchestrator orchestrator;
-
-    @BeforeTest
-    public void setUp() throws Exception {
-        AiravataUtils.setExecutionAsServer();
-        super.setUp();
-        orchestrator = new SimpleOrchestratorImpl();
-        orchestrator.initialize();
-    }
-
-    @Test
-    public void noUserIDTest() throws Exception {
-        ExperimentRequest experimentRequest = new ExperimentRequest();
-        //experimentRequest.setUserExperimentID("test-" + UUID.randomUUID().toString());
-        experimentRequest.setSubmitterUserName("orchestrator");
-
-        String systemExpID = orchestrator.createExperiment(experimentRequest);
-
-        JobRequest jobRequest = createJobRequestWithDocuments(systemExpID);
-
-        boolean b = orchestrator.launchExperiment(jobRequest);
-
-        if (b) {
-            // This means orchestrator successfully accepted the job
-            Assert.assertTrue(true);
-        } else {
-            Assert.assertFalse(true);
-        }
-    }
-
-    @Test
-    public void userIDTest() throws Exception {
-        ExperimentRequest experimentRequest = new ExperimentRequest();
-        experimentRequest.setUserExperimentID("test-" + UUID.randomUUID().toString());
-        experimentRequest.setSubmitterUserName("orchestrator");
-
-        String systemExpID = orchestrator.createExperiment(experimentRequest);
-
-        JobRequest jobRequest = createJobRequestWithDocuments(systemExpID);
-
-        boolean b = orchestrator.launchExperiment(jobRequest);
-
-        if (b) {
-            // This means orchestrator successfully accepted the job
-            Assert.assertTrue(true);
-        } else {
-            Assert.assertFalse(true);
-        }
-    }
-
-
-    private JobRequest createJobRequestWithDocuments(String systemExpID) {
-        JobRequest jobRequest = new JobRequest();
-
-        // creating host description
-        HostDescription descriptor = new HostDescription();
-        descriptor.getType().setHostName("localhost");
-        descriptor.getType().setHostAddress("127.0.0.1");
-
-
-        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[]{}));
-
-
-        ApplicationDescription applicationDeploymentDescription = new ApplicationDescription();
-        ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType = applicationDeploymentDescription
-                .getType();
-        applicationDeploymentDescriptionType.addNewApplicationName().setStringValue("EchoApplication");
-        applicationDeploymentDescriptionType.setExecutableLocation("/bin/echo");
-        applicationDeploymentDescriptionType.setScratchWorkingDirectory("/tmp");
-
-        //creating input Map
-
-        HashMap<String, Object> inputData = new HashMap<String, Object>();
-        ActualParameter echo_input = new ActualParameter();
-        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
-        inputData.put("echo_input", echo_input);
-
-        HashMap<String, Object> outputData = new HashMap<String, Object>();
-
-
-        // setting all the parameters to jobRequest
-        jobRequest.setSystemExperimentID(systemExpID);
-        jobRequest.setHostDescription(descriptor);
-        jobRequest.setServiceDescription(serviceDescription);
-        jobRequest.setApplicationDescription(applicationDeploymentDescription);
-        jobRequest.setInputParameters(inputData);
-        jobRequest.setOutputParameters(outputData);
-        return jobRequest;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/46352680/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/TestWithStoredDescriptors.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/TestWithStoredDescriptors.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/TestWithStoredDescriptors.java
deleted file mode 100644
index 5a654b5..0000000
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/TestWithStoredDescriptors.java
+++ /dev/null
@@ -1,186 +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 java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.UUID;
-
-import junit.framework.Assert;
-
-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.AiravataUtils;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.commons.gfac.type.ActualParameter;
-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.orchestrator.core.model.ExperimentRequest;
-import org.apache.airavata.orchestrator.cpi.Orchestrator;
-import org.apache.airavata.orchestrator.cpi.impl.SimpleOrchestratorImpl;
-import org.apache.airavata.registry.api.JobRequest;
-import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
-import org.apache.airavata.schemas.gfac.DataType;
-import org.apache.airavata.schemas.gfac.InputParameterType;
-import org.apache.airavata.schemas.gfac.OutputParameterType;
-import org.apache.airavata.schemas.gfac.ParameterType;
-import org.apache.airavata.schemas.gfac.StringParameterType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-public class TestWithStoredDescriptors extends AbstractOrchestratorTest {
-    private static final Logger log = LoggerFactory.getLogger(SimpleOrchestratorTest.class);
-
-    private Orchestrator orchestrator;
-
-    @BeforeTest
-    public void setUp() throws Exception {
-        AiravataUtils.setExecutionAsServer();
-        super.setUp();
-        orchestrator = new SimpleOrchestratorImpl();
-        orchestrator.initialize();
-        createJobRequestWithDocuments(getAiravataAPI());
-    }
-
-    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.
-        }
-    }
-
-    @Test
-    public void noDescriptorTest() throws Exception {
-        ExperimentRequest experimentRequest = new ExperimentRequest();
-        experimentRequest.setUserExperimentID("test-" + UUID.randomUUID().toString());
-        experimentRequest.setSubmitterUserName("orchestrator");
-
-        String systemExpID = orchestrator.createExperiment(experimentRequest);
-
-        JobRequest jobRequest = createJobRequestWithoutDocuments(systemExpID);
-
-
-        boolean b = orchestrator.launchExperiment(jobRequest);
-
-        if (b) {
-            // This means orchestrator successfully accepted the job
-            Assert.assertTrue(true);
-        } else {
-            Assert.assertFalse(true);
-        }
-    }
-
-
-    private JobRequest createJobRequestWithoutDocuments(String systemExpID) {
-        JobRequest jobRequest = new JobRequest();
-        jobRequest.setServiceName("Echo");
-
-        HashMap<String, Object> inputData = new HashMap<String, Object>();
-        ActualParameter echo_input = new ActualParameter();
-        ((StringParameterType) echo_input.getType()).setValue("echo_output=hello");
-        inputData.put("echo_input", echo_input);
-
-        HashMap<String, Object> outputData = new HashMap<String, Object>();
-
-
-        // setting all the parameters to jobRequest
-        jobRequest.setSystemExperimentID(systemExpID);
-        jobRequest.setInputParameters(inputData);
-        jobRequest.setOutputParameters(outputData);
-
-        return jobRequest;
-    }
-
-    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;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/46352680/modules/orchestrator/orchestrator-core/src/test/resources/orchestrator.properties
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/resources/orchestrator.properties b/modules/orchestrator/orchestrator-core/src/test/resources/orchestrator.properties
index 60f8dba..766d9b1 100644
--- a/modules/orchestrator/orchestrator-core/src/test/resources/orchestrator.properties
+++ b/modules/orchestrator/orchestrator-core/src/test/resources/orchestrator.properties
@@ -20,6 +20,6 @@
 job.submitter=org.apache.airavata.orchestrator.core.impl.EmbeddedGFACJobSubmitter
 job.validator=org.apache.airavata.orchestrator.core.validator.impl.SimpleAppDataValidator
 submitter.interval=10000
-threadpool.size=10
+threadpool.size=1
 start.submitter=true
 embedded.mode=true
\ No newline at end of file