airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [1/2] git commit: A simple test case - AIRAVATA-1007
Date Tue, 25 Feb 2014 17:01:08 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 102ee17a1 -> ee2824e2d


A simple test case - AIRAVATA-1007


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

Branch: refs/heads/master
Commit: 23ed5039de7f0c071e82c4fa3c707b62dffd66bb
Parents: 94aee74
Author: Suresh Marru <smarru@apache.org>
Authored: Tue Feb 25 12:00:41 2014 -0500
Committer: Suresh Marru <smarru@apache.org>
Committed: Tue Feb 25 12:00:41 2014 -0500

----------------------------------------------------------------------
 .../orchestrator/server/OrchestratorServer.java |  8 ++--
 .../server/OrchestratorServerHandler.java       | 10 +++++
 .../client/OrchestratorClientFactoryTest.java   | 39 ++++++++++++++++++++
 3 files changed, 54 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/23ed5039/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServer.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServer.java
b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServer.java
index c90a845..fba9c05 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServer.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServer.java
@@ -37,8 +37,10 @@ public class OrchestratorServer {
     //FIXME: Read the port from airavata-server.config file
     private static final int ORCHESTRATOT_SERVER_PORT = 8940;
 
+    public static final String TESTARGUMENTTOHANDLER = "testing";
 
-    public static void StartRegistryServer(OrchestratorService.Processor<OrchestratorServerHandler>
orchestratorServerHandlerProcessor)
+
+    public static void StartOrchestratorServer(OrchestratorService.Processor<OrchestratorServerHandler>
orchestratorServerHandlerProcessor)
             throws Exception {
         try {
             TServerTransport serverTransport = new TServerSocket(ORCHESTRATOT_SERVER_PORT);
@@ -53,10 +55,10 @@ public class OrchestratorServer {
     }
 
     public static void main(String[] args) {
-        OrchestratorService.Processor<OrchestratorServerHandler> registryCPIServerHandlerProcessor
=
+        OrchestratorService.Processor<OrchestratorServerHandler> orchestratorServerHandlerProcessor
=
                 new OrchestratorService.Processor<OrchestratorServerHandler>(new OrchestratorServerHandler());
         try {
-            StartRegistryServer(registryCPIServerHandlerProcessor);
+            StartOrchestratorServer(orchestratorServerHandlerProcessor);
         } catch (Exception e) {
             e.printStackTrace();
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/23ed5039/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index 9921047..d965ec9 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@ -32,9 +32,16 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface
{
      */
     @Override
     public String getOrchestratorCPIVersion() throws TException {
+
         return orchestrator_cpi_serviceConstants.ORCHESTRATOR_CPI_VERSION;
     }
 
+
+
+    public OrchestratorServerHandler() {
+        System.out.println("testing the default constructor");
+    }
+
     /**
      * * After creating the experiment Data user have the
      * * experimentID as the handler to the experiment, during the launchExperiment
@@ -49,6 +56,9 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface
{
      */
     @Override
     public boolean launchExperiment(String experimentId) throws TException {
+        //TODO: Write the Orchestrator implementaion
+
+
         return false;
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/23ed5039/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
new file mode 100644
index 0000000..c838398
--- /dev/null
+++ b/modules/orchestrator/airavata-orchestrator-service/src/test/java/org/apache/airavata/orchestrator/client/OrchestratorClientFactoryTest.java
@@ -0,0 +1,39 @@
+/*
+ *
+ * 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.client;
+
+import org.apache.airavata.orchestrator.cpi.OrchestratorService;
+import org.junit.Test;
+
+public class OrchestratorClientFactoryTest {
+
+    @Test
+    public void testCreateOrchestratorClient() throws Exception {
+
+        OrchestratorClientFactory orchestratorClientFactory = new OrchestratorClientFactory();
+
+        OrchestratorService.Client orchestratorClient = orchestratorClientFactory.createOrchestratorClient("localhost",
8940);
+
+        System.out.println("Orchestrator CPI version is " + orchestratorClient.getOrchestratorCPIVersion());
+
+    }
+}


Mime
View raw message