Examples of DryRun


Examples of org.apache.whirr.service.DryRunModule.DryRun

    assertScriptPredicateOnPhase(dryRun, "bootstrap", containsPattern("install_openjdk"));
  }

  @Test
  public void testJavaInstalledTrue() throws Exception {
    DryRun dryRun = launchWithClusterSpec(newClusterSpecForProperties(ImmutableMap.of("whirr.instance-templates", "1 "
        + KerberosServerHandler.ROLE + "+" + KerberosClientHandler.ROLE, "whirr.env.jdk_installed", "true")));
    assertScriptPredicateOnPhase(dryRun, "bootstrap", bootstrapPredicate());
    boolean assertFailed = false;
    try {
      assertScriptPredicateOnPhase(dryRun, "bootstrap", containsPattern("install_openjdk"));
View Full Code Here

Examples of org.apache.whirr.service.DryRunModule.DryRun

    config.setProperty("whirr.state-store", "memory");

    ClusterSpec clusterSpec = ClusterSpec.withTemporaryKeys(config);
    ClusterController controller = new ClusterController();

    DryRun dryRun = getDryRunInControllerForCluster(controller, clusterSpec);
    dryRun.reset();
   
    controller.launchCluster(clusterSpec);
    controller.destroyCluster(clusterSpec);

    ListMultimap<NodeMetadata, Statement> perNodeExecutions = dryRun.getExecutions();

    for (Entry<NodeMetadata, Collection<Statement>> entry : perNodeExecutions
        .asMap().entrySet()) {
      assertSame("An incorrect number of scripts was executed in the node " + entry,
          entry.getValue().size(), 1);
View Full Code Here

Examples of org.apache.whirr.service.DryRunModule.DryRun

    MockClusterActionHandlerListener listener = new MockClusterActionHandlerListener();
    clusterSpec.setHandlerListener(listener);
   
    ClusterController controller = new ClusterController();

    DryRun dryRun = getDryRunInControllerForCluster(controller, clusterSpec);
    dryRun.reset();
   
    controller.launchCluster(clusterSpec);
    controller.destroyCluster(clusterSpec);

    ListMultimap<NodeMetadata, Statement> perNodeExecutions = dryRun.getExecutions();

    for (Entry<NodeMetadata, Collection<Statement>> entry : perNodeExecutions
        .asMap().entrySet()) {
      assertSame("An incorrect number of scripts was executed in the node " + entry,
          entry.getValue().size(), 1);
View Full Code Here

Examples of org.apache.whirr.service.DryRunModule.DryRun

    config.setProperty("whirr.state-store", "memory");

    ClusterSpec clusterSpec = ClusterSpec.withTemporaryKeys(config);
    ClusterController controller = new ClusterController();
   
    DryRun dryRun = getDryRunInControllerForCluster(controller, clusterSpec);
    dryRun.reset();
   
    controller.launchCluster(clusterSpec);
    controller.destroyCluster(clusterSpec);

   
    ListMultimap<NodeMetadata, Statement> perNodeExecutions = dryRun.getExecutions();
    List<StatementOnNode> totalExecutions = dryRun.getTotallyOrderedExecutions();

    // Assert that all nodes executed all three phases and in the right order

    for (Entry<NodeMetadata, Collection<Statement>> entry : perNodeExecutions
        .asMap().entrySet()) {
View Full Code Here

Examples of org.apache.whirr.service.DryRunModule.DryRun

      assertEquals(executedPhases.pop(), phaseName);
    }
  }

public DryRun getDryRunInControllerForCluster(ClusterController controller, ClusterSpec clusterSpec) {
   DryRun dryRun = controller.getCompute().apply(clusterSpec).utils().injector().getInstance(DryRun.class);
   return dryRun;
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.