Search in sources :

Example 41 with TestChaosMonkeyContext

use of com.netflix.simianarmy.chaos.TestChaosMonkeyContext in project SimianArmy by Netflix.

the class TestTunablyAggressiveChaosMonkey method testFullProbability_basic.

@Test
public void testFullProbability_basic() {
    TestChaosMonkeyContext ctx = new TestChaosMonkeyContext("fullProbability.properties");
    TunablyAggressiveChaosMonkey chaos = new TunablyAggressiveChaosMonkey(ctx);
    InstanceGroup basic = new BasicInstanceGroup("basic", GroupTypes.TYPE_A, "region", Collections.<TagDescription>emptyList());
    double probability = chaos.getEffectiveProbability(basic);
    Assert.assertEquals(probability, 1.0);
}
Also used : BasicInstanceGroup(com.netflix.simianarmy.basic.chaos.BasicInstanceGroup) TestChaosMonkeyContext(com.netflix.simianarmy.chaos.TestChaosMonkeyContext) InstanceGroup(com.netflix.simianarmy.chaos.ChaosCrawler.InstanceGroup) BasicInstanceGroup(com.netflix.simianarmy.basic.chaos.BasicInstanceGroup) Test(org.testng.annotations.Test)

Aggregations

TestChaosMonkeyContext (com.netflix.simianarmy.chaos.TestChaosMonkeyContext)41 Test (org.testng.annotations.Test)41 ChaosMonkey (com.netflix.simianarmy.chaos.ChaosMonkey)27 InstanceGroup (com.netflix.simianarmy.chaos.ChaosCrawler.InstanceGroup)18 BasicChaosMonkey (com.netflix.simianarmy.basic.chaos.BasicChaosMonkey)5 BeforeTest (org.testng.annotations.BeforeTest)5 Monkey (com.netflix.simianarmy.Monkey)1 MonkeyScheduler (com.netflix.simianarmy.MonkeyScheduler)1 BasicInstanceGroup (com.netflix.simianarmy.basic.chaos.BasicInstanceGroup)1