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/04/09 06:25:49 UTC

git commit: fixing build for gridTests profile

Repository: airavata
Updated Branches:
  refs/heads/master de61d5116 -> e16173855


fixing build for gridTests profile


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

Branch: refs/heads/master
Commit: e16173855e7d8cc3bd6fe2c343c6f54c8cb504fb
Parents: de61d51
Author: lahiru <la...@apache.org>
Authored: Wed Apr 9 00:24:50 2014 -0400
Committer: lahiru <la...@apache.org>
Committed: Wed Apr 9 00:24:50 2014 -0400

----------------------------------------------------------------------
 .../gfac/context/JobExecutionContext.java       | 11 +++
 .../airavata/gfac/handler/AbstractHandler.java  |  5 +-
 .../gfac/handler/SCPDirectorySetupHandler.java  |  1 -
 .../impl/GSISSHProviderTestWithMyProxyAuth.java | 33 +++++++--
 .../src/test/resources/service.properties       | 58 ---------------
 .../registry/jpa/impl/LoggingRegistryImpl.java  | 67 +++++++++++++++++
 .../registry/jpa/impl/RegistryFactory.java      |  7 ++
 pom.xml                                         | 13 ++--
 .../ssh/config/SCPFromTestWithMyProxyAuth.java  | 41 ++++++-----
 .../gsi/ssh/config/SCPToTestWithSSHAuth.java    | 75 --------------------
 .../impl/DefaultSSHApiTestWithMyProxyAuth.java  | 58 ++-------------
 .../gsi/ssh/impl/VanilaTestWithSSHAuth.java     |  9 +--
 12 files changed, 156 insertions(+), 222 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/e1617385/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
index 2a196fe..43708c7 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
@@ -33,6 +33,7 @@ import org.apache.airavata.gfac.notification.GFacNotifier;
 import org.apache.airavata.gfac.provider.GFacProvider;
 import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.registry.cpi.Registry;
 
 public class JobExecutionContext extends AbstractContext{
 
@@ -80,6 +81,8 @@ public class JobExecutionContext extends AbstractContext{
     private String status;
 
     private List<String> outputFileList;
+
+    private Registry registry;
     /**
      *  Security context is used to handle authentication for input handlers and providers.
      *  There can be multiple security requirement for a single job so this allows you to add multiple security types
@@ -238,4 +241,12 @@ public class JobExecutionContext extends AbstractContext{
     public List<String> getOutputFiles(){
         return outputFileList;
     }
+
+    public Registry getRegistry() {
+        return registry;
+    }
+
+    public void setRegistry(Registry registry) {
+        this.registry = registry;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/e1617385/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/AbstractHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/AbstractHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/AbstractHandler.java
index e3db75a..2468273 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/AbstractHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/AbstractHandler.java
@@ -29,7 +29,10 @@ public abstract class AbstractHandler implements GFacHandler {
 	protected Registry registry = null;
 
 	public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException, GFacException {
-		registry = RegistryFactory.getDefaultRegistry();
+		registry = jobExecutionContext.getRegistry();
+        if(registry == null){
+            registry = RegistryFactory.getDefaultRegistry();
+        }
 	}
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/e1617385/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPDirectorySetupHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPDirectorySetupHandler.java
index ead2ad4..a068b77 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPDirectorySetupHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/SCPDirectorySetupHandler.java
@@ -43,7 +43,6 @@ import org.slf4j.LoggerFactory;
 
 public class SCPDirectorySetupHandler extends AbstractHandler{
     private static final Logger log = LoggerFactory.getLogger(SCPDirectorySetupHandler.class);
-    private List<String> errors = new ArrayList<String>();
 
 	public void invoke(JobExecutionContext jobExecutionContext) throws GFacException {
 		log.info("Setup SSH job directorties");

http://git-wip-us.apache.org/repos/asf/airavata/blob/e1617385/modules/gfac/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java b/modules/gfac/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
index 57b0c79..acb6bd5 100644
--- a/modules/gfac/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-core/src/test/java/org/apache/airavata/core/gfac/services/impl/GSISSHProviderTestWithMyProxyAuth.java
@@ -40,6 +40,8 @@ import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
 import org.apache.airavata.gsi.ssh.impl.PBSCluster;
 import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
 import org.apache.airavata.gsi.ssh.util.CommonUtils;
+import org.apache.airavata.model.workspace.experiment.TaskDetails;
+import org.apache.airavata.persistance.registry.jpa.impl.RegistryFactory;
 import org.apache.airavata.schemas.gfac.*;
 import org.junit.Before;
 import org.junit.Test;
@@ -57,12 +59,28 @@ public class GSISSHProviderTestWithMyProxyAuth {
     //FIXME: move job properties to configuration file
     private static final String hostAddress = "trestles.sdsc.edu";
     private static final String hostName = "trestles";
-    private static final String myProxyUserName = "ogce";
-    private static final String myProxyPassword = "";
-    private static final String certificateLocation = "/Users/raminder/.globus/certificates/";
+    private String myProxyUserName;
+    private String myProxyPassword;
+    private String workingDirectory;
+    private String certificateLocation = "/Users/lahirugunathilake/Downloads/certificates";
 
     @Before
     public void setUp() throws Exception {
+        System.setProperty("myproxy.user", "ogce");
+        System.setProperty("myproxy.password", "");
+        System.setProperty("basedir", "/Users/lahirugunathilake/Downloads");
+        System.setProperty("gsi.working.directory", "/home/ogce");
+        System.setProperty("gsi.certificate.path", "/Users/lahirugunathilake/Downloads/certificates");
+        certificateLocation = System.getProperty("gsi.certificate.path");
+        myProxyUserName = System.getProperty("myproxy.user");
+        myProxyPassword = System.getProperty("myproxy.password");
+        workingDirectory = System.getProperty("gsi.working.directory");
+
+        if (myProxyUserName == null || myProxyPassword == null || certificateLocation == null) {
+            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
+                    "E.g :- mvn clean install -Dmyproxy.user=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
+            throw new Exception("Need my proxy user name password to run tests.");
+        }
         URL resource = GSISSHProviderTestWithMyProxyAuth.class.getClassLoader().getResource(org.apache.airavata.common.utils.Constants.GFAC_CONFIG_XML);
         assert resource != null;
         System.out.println(resource.getFile());
@@ -116,7 +134,7 @@ public class GSISSHProviderTestWithMyProxyAuth {
         date = date.replaceAll(" ", "_");
         date = date.replaceAll(":", "_");
 
-        tempDir = tempDir + File.separator
+        tempDir = workingDirectory + File.separator
                 + "SimpleEcho" + "_" + date + "_" + UUID.randomUUID();
 
         System.out.println(tempDir);
@@ -159,7 +177,7 @@ public class GSISSHProviderTestWithMyProxyAuth {
 
         jobExecutionContext = new JobExecutionContext(gFacConfiguration, serv.getType().getName());
         // Adding security context
-        jobExecutionContext.addSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT, getSecurityContext(app));
+        jobExecutionContext.addSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT, getSecurityContext(app));
         ApplicationContext applicationContext = new ApplicationContext();
         jobExecutionContext.setApplicationContext(applicationContext);
         applicationContext.setServiceDescription(serv);
@@ -178,7 +196,8 @@ public class GSISSHProviderTestWithMyProxyAuth {
         ActualParameter echo_out = new ActualParameter();
 //		((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
         outMessage.addParameter("echo_output", echo_out);
-
+        jobExecutionContext.setRegistry(RegistryFactory.getLoggingRegistry());
+        jobExecutionContext.setTaskData(new TaskDetails("11323"));
         jobExecutionContext.setOutMessageContext(outMessage);
 
     }
@@ -203,6 +222,8 @@ public class GSISSHProviderTestWithMyProxyAuth {
     public void testGramProvider() throws GFacException {
         GFacImpl gFacAPI = new GFacImpl();
         gFacAPI.submitJob(jobExecutionContext);
+        System.out.println(jobExecutionContext.getJobDetails().getJobDescription());
+        System.out.println(jobExecutionContext.getJobDetails().getJobID());
     }
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/e1617385/modules/gfac/gfac-core/src/test/resources/service.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/test/resources/service.properties b/modules/gfac/gfac-core/src/test/resources/service.properties
deleted file mode 100644
index 391bfea..0000000
--- a/modules/gfac/gfac-core/src/test/resources/service.properties
+++ /dev/null
@@ -1,58 +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.
-#
-#
-
-
-#
-# Class which implemented Scheduler interface. It will be used to determine a Provider
-#
-scheduler.class= org.apache.airavata.core.gfac.scheduler.impl.SchedulerImpl
-
-#
-# Data Service Plugins classes
-#
-datachain.classes= org.apache.airavata.core.gfac.extension.data.RegistryDataService
-
-#
-# Pre execution Plugins classes. For example, GridFTP Input Staging
-#
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.GridFtpInputStaging 
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.HttpInputStaging
-
-#
-# Post execution Plugins classes. For example, GridFTP Output Staging
-#
-postchain.classes= org.apache.airavata.core.gfac.extension.post.GridFtpOutputStaging
-postchain.classes= org.apache.airavata.core.gfac.extension.post.OutputRegister
-
-#
-# SSH private key location. It will be used by SSHProvider
-#
-# ssh.key=/home/user/.ssh/id_rsa
-# ssh.keypass=
-# ssh.username=usernameAtHost
-
-#
-# MyProxy credential. It will be used by GridFTP Plugins and GramProvider.
-#
-# myproxy.server=myproxy.teragrid.org
-# myproxy.user=username
-# myproxy.pass=password
-# myproxy.life=3600
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/e1617385/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java
new file mode 100644
index 0000000..49532d9
--- /dev/null
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/LoggingRegistryImpl.java
@@ -0,0 +1,67 @@
+/*
+ *
+ * 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.persistance.registry.jpa.impl;
+
+import org.apache.airavata.registry.cpi.*;
+
+import java.util.List;
+
+public class LoggingRegistryImpl implements Registry {
+    public Object add(ChildDataType dataType, Object newObjectToAdd, Object dependentIdentifiers) throws RegistryException {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public Object add(ParentDataType dataType, Object newObjectToAdd) throws RegistryException {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void update(DataType dataType, Object newObjectToUpdate, Object identifier) throws RegistryException {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void update(DataType dataType, Object identifier, String fieldName, Object value) throws RegistryException {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public Object get(DataType dataType, Object identifier) throws RegistryException {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public List<Object> get(DataType dataType, String fieldName, Object value) throws RegistryException {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public Object getValue(DataType dataType, Object identifier, String field) throws RegistryException {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public List<String> getIds(DataType dataType, String fieldName, Object value) throws RegistryException {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public void remove(DataType dataType, Object identifier) throws RegistryException {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    public boolean isExist(DataType dataType, Object identifier) throws RegistryException {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e1617385/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java
index 476347f..3d21e95 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/RegistryFactory.java
@@ -39,4 +39,11 @@ public class RegistryFactory {
         }
         return registry;
     }
+
+    public static Registry getLoggingRegistry() {
+        if(registry == null) {
+            registry = new LoggingRegistryImpl();
+        }
+        return registry;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/e1617385/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 56a584c..ca8f563 100644
--- a/pom.xml
+++ b/pom.xml
@@ -484,14 +484,14 @@
                 <module>modules/test-suite</module>
                 <module>modules/distribution</module>
                 <module>modules/integration-tests</module>
-		<module>modules/configuration</module>
-		<module>modules/ws-messenger</module>
+                <module>modules/configuration</module>
+                <module>modules/ws-messenger</module>
                 <!--module>modules/rest</module-->
                 <!--module>samples</module-->
                 <!--module>modules/xbaya-gui</module-->
             </modules>
         </profile>
-        <!--profile>
+        <profile>
             <id>gridTests</id>
             <build>
                 <plugins>
@@ -556,9 +556,6 @@
                     </plugin>
                 </plugins>
             </build>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
             <modules>
                 <module>airavata-api</module>
                 <module>modules/gfac</module>
@@ -572,13 +569,13 @@
                 <module>modules/orchestrator</module>
                 <module>tools</module>
                 <module>modules/server</module>
-		<module>modules/configuration</module>
+                <module>modules/configuration</module>
                 <module>modules/test-suite</module>
                 <module>modules/distribution</module>
                 <module>modules/integration-tests</module>
             </modules>
         </profile>
-        <profile>
+        <!--profile>
             <id>ec2Tests</id>
             <build>
                 <plugins>

http://git-wip-us.apache.org/repos/asf/airavata/blob/e1617385/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/config/SCPFromTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/config/SCPFromTestWithMyProxyAuth.java b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/config/SCPFromTestWithMyProxyAuth.java
index 8d0674a..4e893c9 100644
--- a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/config/SCPFromTestWithMyProxyAuth.java
+++ b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/config/SCPFromTestWithMyProxyAuth.java
@@ -26,6 +26,7 @@ import org.apache.airavata.gsi.ssh.api.ServerInfo;
 import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
 import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
 import org.apache.airavata.gsi.ssh.util.SSHUtils;
+import org.junit.Assert;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
@@ -40,35 +41,41 @@ public class SCPFromTestWithMyProxyAuth {
     public void setUp() throws Exception {
 //        System.setProperty("myproxy.user", "ogce");
 //        System.setProperty("myproxy.password", "");
-//        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
+//        System.setProperty("gsi.certificate.path", "/Users/lahirugunathilake/Downloads/certificates");
         myProxyUserName = System.getProperty("myproxy.user");
         myProxyPassword = System.getProperty("myproxy.password");
-        String pomDirectory = System.getProperty("basedir");
+        certificateLocation = System.getProperty("gsi.certificate.path");
 
-        File pomFileDirectory = new File(pomDirectory);
-
-        System.out.println("POM directory ----------------- " + pomFileDirectory.getAbsolutePath());
-
-        certificateLocation = pomFileDirectory.getAbsolutePath() + "/certificates";
-
-
-        lFilePath = pomDirectory + File.separator + "pom.xml";
-        rFilePath = "/tmp/";
+        System.out.println(myProxyPassword + "," + myProxyUserName + "," + certificateLocation);
+        if ((myProxyUserName == null) || (myProxyPassword == null) || (certificateLocation == null)) {
+            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
+                    "E.g :- mvn clean install -Dmyproxy.user=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<" +
+                    "gsi.certificate.path=/cert/path");
+            throw new Exception("Need my proxy user name password to run tests.");
+        }
     }
 
 
     @Test
     public void testExecuteCommand() throws Exception {
-         // Create authentication
+        // Create authentication
+        File test = new File("test");
+        if(!test.exists()){
+            test.createNewFile();
+        }
+        lFilePath = test.getAbsolutePath();
+        System.out.println(lFilePath);
         GSIAuthenticationInfo authenticationInfo
                 = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
-                7512, 17280000,certificateLocation);
-        ServerInfo serverInfo = new ServerInfo("ogce" ,"trestles.sdsc.edu");
+                7512, 17280000, certificateLocation);
+        ServerInfo serverInfo = new ServerInfo("ogce", "trestles.sdsc.edu");
         SSHUtils SSHUtils = new SSHUtils(serverInfo, authenticationInfo, this.certificateLocation, new ConfigReader());
-        SSHUtils.scpTo(rFilePath, lFilePath);
+        SSHUtils.scpTo("/tmp", lFilePath);
         Thread.sleep(1000);
-        SSHUtils.scpFrom(File.separator + "tmp" + File.separator + "pom.xml", System.getProperty("basedir"));
+        SSHUtils.scpFrom(File.separator + "tmp" + File.separator + "test", lFilePath);
+        boolean delete = test.delete();
+        Assert.assertTrue(delete);
     }
-
+    /* add more test cases for each ssh operation */
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/e1617385/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/config/SCPToTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/config/SCPToTestWithSSHAuth.java b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/config/SCPToTestWithSSHAuth.java
deleted file mode 100644
index 198fcd9..0000000
--- a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/config/SCPToTestWithSSHAuth.java
+++ /dev/null
@@ -1,75 +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.gsi.ssh.config;
-
-import org.apache.airavata.gsi.ssh.api.authentication.GSIAuthenticationInfo;
-import org.apache.airavata.gsi.ssh.util.SSHUtils;
-import org.apache.airavata.gsi.ssh.api.ServerInfo;
-import org.apache.airavata.gsi.ssh.impl.authentication.MyProxyAuthenticationInfo;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Test;
-
-import java.io.File;
-
-public class SCPToTestWithSSHAuth {
-    private String myProxyUserName;
-    private String myProxyPassword;
-    private String certificateLocation;
-    private String lFilePath;
-    private String rFilePath;
-
-    @BeforeTest
-    public void setUp() throws Exception {
-//        System.setProperty("myproxy.user", "ogce");
-//        System.setProperty("myproxy.password", "");
-//        System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
-        myProxyUserName = System.getProperty("myproxy.user");
-        myProxyPassword = System.getProperty("myproxy.password");
-
-        String pomDirectory = System.getProperty("basedir");
-
-        File pomFileDirectory = new File(pomDirectory);
-
-        System.out.println("POM directory ----------------- " + pomFileDirectory.getAbsolutePath());
-
-        certificateLocation = pomFileDirectory.getAbsolutePath() + "/certificates";
-
-        if (myProxyUserName == null || myProxyPassword == null) {
-            System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
-                    "E.g :- mvn clean install -Dmyproxy.user=xxx -Dmyproxy.password=xxx <<<<<<<");
-            throw new Exception("Need my proxy user name password to run tests.");
-        }
-        lFilePath = pomDirectory + File.separator + "pom.xml";
-        rFilePath = "/tmp";
-    }
-
-
-    @Test
-    public void testExecuteCommand() throws Exception {
-         // Create authentication
-        GSIAuthenticationInfo authenticationInfo
-                = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
-                7512, 17280000,certificateLocation);
-        ServerInfo serverInfo = new ServerInfo("ogce" ,"trestles.sdsc.edu");
-        SSHUtils scpTo = new SSHUtils(serverInfo,authenticationInfo,this.certificateLocation,new ConfigReader());
-        scpTo.scpTo(rFilePath, lFilePath);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/e1617385/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
index 030f868..320c8b8 100644
--- a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
+++ b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/DefaultSSHApiTestWithMyProxyAuth.java
@@ -50,10 +50,11 @@ public class DefaultSSHApiTestWithMyProxyAuth {
 
     @BeforeTest
     public void setUp() throws Exception {
-        System.setProperty("myproxy.user", "ogce");
-        System.setProperty("myproxy.password", "");
-        System.setProperty("basedir", "/Users/lahirugunathilake/Downloads");
-        System.setProperty("gsi.working.directory", "/home/ogce");
+//        System.setProperty("myproxy.user", "ogce");
+//        System.setProperty("myproxy.password", "");
+//        System.setProperty("basedir", "/Users/lahirugunathilake/Downloads");
+//        System.setProperty("gsi.working.directory", "/home/ogce");
+        certificateLocation = System.getProperty("gsi.certificate.path");
         myProxyUserName = System.getProperty("myproxy.user");
         myProxyPassword = System.getProperty("myproxy.password");
         workingDirectory = System.getProperty("gsi.working.directory");
@@ -64,9 +65,6 @@ public class DefaultSSHApiTestWithMyProxyAuth {
 
         System.out.println("POM directory ----------------- " + pomFileDirectory.getAbsolutePath());
 
-        certificateLocation = pomFileDirectory.getAbsolutePath() + "/certificates";
-
-
         if (myProxyUserName == null || myProxyPassword == null || workingDirectory == null) {
             System.out.println(">>>>>> Please run tests with my proxy user name and password. " +
                     "E.g :- mvn clean install -Dmyproxy.user=xxx -Dmyproxy.password=xxx -Dgsi.working.directory=/path<<<<<<<");
@@ -329,48 +327,8 @@ public class DefaultSSHApiTestWithMyProxyAuth {
         DefaultJobSubmissionListener listener = new DefaultJobSubmissionListener();
         String jobID = pbsCluster.submitBatchJob(jobDescriptor);
         try {
-//            // Wait 5 seconds to start the first poll, this is hard coded, user doesn't have
-//            // to configure this.
-//            Thread.sleep(5000);
-//        } catch (InterruptedException e) {
-//            log.error("Error during job status monitoring");
-//            throw new SSHApiException("Error during job status monitoring", e);
-//        }
-//        // Get the job status first
-//        try {
-////
-////            Thread t = new Thread() {
-////                @Override
-////                public void run() {
-////                    try {
-            // p
             JobStatus jobStatus = pbsCluster.getJobStatus(jobID);
-            while (true) {
-                while (!jobStatus.equals(JobStatus.C.toString())) {
-                    if (!jobStatus.equals(listener.getJobStatus().toString())) {
-                        listener.setJobStatus(jobStatus);
-                        listener.statusChanged(jobStatus);
-                    }
-                    Thread.sleep(60000);
-
-                    jobStatus = pbsCluster.getJobStatus(jobID);
-                }
-                //Set the job status to Complete
-                listener.setJobStatus(JobStatus.C);
-                listener.statusChanged(jobStatus);
-                break;
-            }
-//                    } catch (InterruptedException e) {
-//                        log.error("Error listening to the submitted job", e);
-//                    } catch (SSHApiException e) {
-//                        log.error("Error listening to the submitted job", e);
-//                    }
-//                }
-//            };
-            //  This thread runs until the program termination, so that use can provide
-//            // any action in onChange method of the listener, without worrying for waiting in the caller thread.
-            //t.setDaemon(true);
-//            t.start();
+            org.junit.Assert.assertTrue(true);
         } catch (Exception e) {
             log.error("Error during job status monitoring");
             throw new SSHApiException("Error during job status monitoring", e);
@@ -386,14 +344,10 @@ public class DefaultSSHApiTestWithMyProxyAuth {
         GSIAuthenticationInfo authenticationInfo
                 = new MyProxyAuthenticationInfo(myProxyUserName, myProxyPassword, "myproxy.teragrid.org",
                 7512, 17280000, certificateLocation);
-
         // Server info
         ServerInfo serverInfo = new ServerInfo("ogce", "trestles.sdsc.edu");
-
-
         Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager("/opt/torque/bin/"));
 
-
         // Execute command
         System.out.println("Target PBS file path: " + workingDirectory);
         System.out.println("Local PBS File path: " + pbsFilePath);

http://git-wip-us.apache.org/repos/asf/airavata/blob/e1617385/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java
index 576d4ee..461ea8a 100644
--- a/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java
+++ b/tools/gsissh/src/test/java/org/apache/airavata/gsi/ssh/impl/VanilaTestWithSSHAuth.java
@@ -50,7 +50,7 @@ public class VanilaTestWithSSHAuth {
 
     @BeforeTest
     public void setUp() throws Exception {
-        this.hostName = "bigred2.uits.iu.edu";
+        this.hostName = "trestles.sdsc.edu";
 
 //        this.userName = System.setProperty("my.ssh.user", "lginnali");
 //        this.password = System.setProperty("my.ssh.password", "");
@@ -63,6 +63,7 @@ public class VanilaTestWithSSHAuth {
         this.passPhrase = System.getProperty("my.ssh.user.pass.phrase");
         this.workingDirectory = System.getProperty("ssh.working.directory");
 
+
         System.out.println();
 
 
@@ -88,7 +89,7 @@ public class VanilaTestWithSSHAuth {
         }
 
         // Create command
-        CommandInfo commandInfo = new RawCommandInfo("/opt/torque/torque-4.2.3.1/bin/qstat");
+        CommandInfo commandInfo = new RawCommandInfo("/opt/torque/bin/qstat");
 
         // Server info
         ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
@@ -115,7 +116,7 @@ public class VanilaTestWithSSHAuth {
         }
         // Server info
         ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
-        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager("/opt/torque/torque-4.2.3.1/bin/"));
+        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager("/opt/torque/bin/"));
 
         String date = new Date().toString();
         date = date.replaceAll(" ", "_");
@@ -198,7 +199,7 @@ public class VanilaTestWithSSHAuth {
         }
         // Server info
         ServerInfo serverInfo = new ServerInfo(this.userName, this.hostName);
-        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager("/opt/torque/torque-4.2.3.1/bin/"));
+        Cluster pbsCluster = new PBSCluster(serverInfo, authenticationInfo, CommonUtils.getPBSJobManager("/opt/torque/bin/"));
 
         String date = new Date().toString();
         date = date.replaceAll(" ", "_");