Package org.apache.oodt.cas.resource.system.MockXmlRpcResourceManagerClient

Examples of org.apache.oodt.cas.resource.system.MockXmlRpcResourceManagerClient.MethodCallDetails


   public void testGetQueuesWithNode() {
      String nodeId = "TestNodeId";
      cmdLineUtility.run(("--url http://localhost:9000"
            + " --operation --getQueuesWithNode --nodeId "
            + nodeId).split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("getQueuesWithNode", methodCallDetails.getMethodName());
      assertEquals(nodeId, methodCallDetails.getArgs().get(0));
   }
View Full Code Here


   public void testKill() {
      String jobId = "TestJobId";
      cmdLineUtility.run(("--url http://localhost:9000"
            + " --operation --kill --jobId "
            + jobId).split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("killJob", methodCallDetails.getMethodName());
      assertEquals(jobId, methodCallDetails.getArgs().get(0));
   }
View Full Code Here

   public void testRemoveNode() {
      String nodeId = "TestNodeId";
      cmdLineUtility.run(("--url http://localhost:9000"
            + " --operation --removeNode --nodeId "
            + nodeId).split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("removeNode", methodCallDetails.getMethodName());
      assertEquals(nodeId, methodCallDetails.getArgs().get(0));
   }
View Full Code Here

      String nodeId = "TestNodeId";
      String queueName = "TestQueueNames";
      cmdLineUtility.run(("--url http://localhost:9000"
            + " --operation --removeNodeFromQueue --nodeId "
            + nodeId + " --queueName " + queueName).split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("removeNodeFromQueue", methodCallDetails.getMethodName());
      assertEquals(nodeId, methodCallDetails.getArgs().get(0));
      assertEquals(queueName, methodCallDetails.getArgs().get(1));
   }
View Full Code Here

   public void testRemoveQueue() {
      String queueName = "TestQueueName";
      cmdLineUtility.run(("--url http://localhost:9000"
            + " --operation --removeQueue --queueName "
            + queueName).split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("removeQueue", methodCallDetails.getMethodName());
      assertEquals(queueName, methodCallDetails.getArgs().get(0));
   }
View Full Code Here

      int capacity = 4;
      String nodeId = "TestNodeId";
      cmdLineUtility.run(("--url http://localhost:9000"
            + " --operation --setNodeCapacity --capacity "
            + capacity + " --nodeId " + nodeId).split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("setNodeCapacity", methodCallDetails.getMethodName());
      assertEquals(nodeId, methodCallDetails.getArgs().get(0));
      assertEquals(capacity, methodCallDetails.getArgs().get(1));
   }
View Full Code Here

      String jobDefinitionFile = "src/main/resources/examples/jobs/exJob.xml";
      cmdLineUtility.run(("--url http://localhost:9000"
            + " --operation --submitJob --def "
            + jobDefinitionFile).split(" "));
      JobSpec spec = JobBuilder.buildJobSpec(jobDefinitionFile);
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("submitJob", methodCallDetails.getMethodName());
      Job actualJob = (Job) methodCallDetails.getArgs().get(0);
      assertEquals(spec.getJob().getJobInstanceClassName(), actualJob.getJobInstanceClassName());
      assertEquals(spec.getJob().getJobInputClassName(), actualJob.getJobInputClassName());
      assertEquals(spec.getJob().getQueueName(), actualJob.getQueueName());
      assertEquals(spec.getJob().getLoadValue(), actualJob.getLoadValue());
      JobInput actualJobInput = (JobInput) methodCallDetails.getArgs().get(1);
      assertEquals(spec.getIn().getClass(), actualJobInput.getClass());
      assertEquals(2, methodCallDetails.getArgs().size());

      OptionPropertyRegister.clearRegister();

      String url = "http://localhost:9000";
      cmdLineUtility.run(("--url http://localhost:9000"
            + " --operation --submitJob --def "
            + jobDefinitionFile + " --nodeUrl " + url).split(" "));
      methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("submitJob", methodCallDetails.getMethodName());
      actualJob = (Job) methodCallDetails.getArgs().get(0);
      assertEquals(spec.getJob().getJobInstanceClassName(), actualJob.getJobInstanceClassName());
      assertEquals(spec.getJob().getJobInputClassName(), actualJob.getJobInputClassName());
      assertEquals(spec.getJob().getQueueName(), actualJob.getQueueName());
      assertEquals(spec.getJob().getLoadValue(), actualJob.getLoadValue());
      actualJobInput = (JobInput) methodCallDetails.getArgs().get(1);
      assertEquals(spec.getIn().getClass(), actualJobInput.getClass());
      assertEquals(new URL(url), methodCallDetails.getArgs().get(2));
      assertEquals(3, methodCallDetails.getArgs().size());
   }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.resource.system.MockXmlRpcResourceManagerClient.MethodCallDetails

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.