Package org.apache.aurora.scheduler.updater.UpdateFactory

Examples of org.apache.aurora.scheduler.updater.UpdateFactory.Update


    factory = new UpdateFactory.UpdateFactoryImpl(new FakeClock());
  }

  @Test
  public void testRollingForward() throws Exception  {
    Update update = factory.newUpdate(INSTRUCTIONS, true);
    assertEquals(ImmutableSet.of(0, 1, 2), update.getUpdater().getInstances());
  }
View Full Code Here


    assertEquals(ImmutableSet.of(0, 1, 2), update.getUpdater().getInstances());
  }

  @Test
  public void testRollingBack() throws Exception {
    Update update = factory.newUpdate(INSTRUCTIONS, false);
    assertEquals(ImmutableSet.of(0, 1, 2), update.getUpdater().getInstances());
  }
View Full Code Here

  @Test
  public void testRollForwardSpecificInstances() throws Exception {
    JobUpdateInstructions config = INSTRUCTIONS.newBuilder();
    config.getSettings().setUpdateOnlyTheseInstances(ImmutableSet.of(new Range(1, 2)));

    Update update = factory.newUpdate(IJobUpdateInstructions.build(config), true);
    assertEquals(ImmutableSet.of(1, 2), update.getUpdater().getInstances());
  }
View Full Code Here

  @Test
  public void testRollBackSpecificInstances() throws Exception {
    JobUpdateInstructions config = INSTRUCTIONS.newBuilder();
    config.getSettings().setUpdateOnlyTheseInstances(ImmutableSet.of(new Range(1, 2)));

    Update update = factory.newUpdate(IJobUpdateInstructions.build(config), false);
    assertEquals(ImmutableSet.of(1, 2), update.getUpdater().getInstances());
  }
View Full Code Here

  @Test
  public void testUpdateRemovesInstance() throws Exception {
    JobUpdateInstructions config = INSTRUCTIONS.newBuilder();
    config.getDesiredState().setInstances(ImmutableSet.of(new Range(0, 1)));

    Update update = factory.newUpdate(IJobUpdateInstructions.build(config), true);
    assertEquals(ImmutableSet.of(0, 1, 2), update.getUpdater().getInstances());
  }
View Full Code Here

TOP

Related Classes of org.apache.aurora.scheduler.updater.UpdateFactory.Update

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.