use of com.netflix.simianarmy.chaos.ChaosMonkey in project SimianArmy by Netflix.
the class TestBasicChaosMonkey method testMandatoryTerminationInsideWindowWithPreviousTermination.
@Test
public void testMandatoryTerminationInsideWindowWithPreviousTermination() {
TestChaosMonkeyContext ctx = new TestChaosMonkeyContext("mandatoryTerminationInsideWindow.properties");
terminateOnDemand(ctx, "TYPE_C", "name4");
Assert.assertEquals(ctx.selectedOn().size(), 1);
Assert.assertEquals(ctx.terminated().size(), 1);
ChaosMonkey chaos = new BasicChaosMonkey(ctx);
chaos.start();
chaos.stop();
// There was termination in the last window, so no mandatory termination is triggered
Assert.assertEquals(ctx.selectedOn().size(), 2);
Assert.assertEquals(ctx.terminated().size(), 1);
}
use of com.netflix.simianarmy.chaos.ChaosMonkey in project SimianArmy by Netflix.
the class TestBasicChaosMonkey method testMandatoryTerminationOutsideWindowWithPreviousTermination.
@Test
public void testMandatoryTerminationOutsideWindowWithPreviousTermination() {
TestChaosMonkeyContext ctx = new TestChaosMonkeyContext("mandatoryTerminationOutsideWindow.properties");
terminateOnDemand(ctx, "TYPE_C", "name4");
Assert.assertEquals(ctx.selectedOn().size(), 1);
Assert.assertEquals(ctx.terminated().size(), 1);
ChaosMonkey chaos = new BasicChaosMonkey(ctx);
chaos.start();
chaos.stop();
// There was termination in the last window, so no mandatory termination is triggered
Assert.assertEquals(ctx.selectedOn().size(), 2);
Assert.assertEquals(ctx.terminated().size(), 1);
}
Aggregations