Search in sources :

Example 1 with DefaultPlan

use of com.mesosphere.sdk.scheduler.plan.DefaultPlan in project dcos-commons by mesosphere.

the class SchedulerBuilderTest method getDeployUpdatePlans.

// Deploy plan has 2 phases, update plan has 1 for distinguishing which was chosen.
private static Collection<Plan> getDeployUpdatePlans() {
    Phase phase = mock(Phase.class);
    Plan deployPlan = new DefaultPlan(Constants.DEPLOY_PLAN_NAME, Arrays.asList(phase, phase));
    Assert.assertEquals(2, deployPlan.getChildren().size());
    Plan updatePlan = new DefaultPlan(Constants.UPDATE_PLAN_NAME, Arrays.asList(phase));
    Assert.assertEquals(1, updatePlan.getChildren().size());
    return Arrays.asList(deployPlan, updatePlan);
}
Also used : Phase(com.mesosphere.sdk.scheduler.plan.Phase) DefaultPlan(com.mesosphere.sdk.scheduler.plan.DefaultPlan) Plan(com.mesosphere.sdk.scheduler.plan.Plan) DefaultPlan(com.mesosphere.sdk.scheduler.plan.DefaultPlan)

Aggregations

DefaultPlan (com.mesosphere.sdk.scheduler.plan.DefaultPlan)1 Phase (com.mesosphere.sdk.scheduler.plan.Phase)1 Plan (com.mesosphere.sdk.scheduler.plan.Plan)1