@Test public void stopContainer () throws Exception { awsEC2Container.stopContainer(experiment); verify(experiment, times(1)).setCheckContainerHealth(ArgumentMatchers.any()); verify(experiment, times(1)).setSelfHealingMethod(ArgumentMatchers.any()); verify(awsEC2Platform, times(1)).stopInstance(INSTANCE_ID); verify(awsEC2Platform, times(0)).startInstance(INSTANCE_ID); experiment.getSelfHealingMethod().run(); verify(awsEC2Platform, times(1)).startInstance(INSTANCE_ID); verify(awsEC2Platform, times(0)).checkHealth(INSTANCE_ID); experiment.getCheckContainerHealth().call(); verify(awsEC2Platform, times(1)).checkHealth(INSTANCE_ID); }
@ChaosExperiment(experimentType = ExperimentType.STATE) public void stopContainer (Experiment experiment) { awsEC2Platform.stopInstance(instanceId); experiment.setSelfHealingMethod(autoscalingSelfHealingWrapper(startContainerMethod)); experiment.setCheckContainerHealth(autoscalingHealthcheckWrapper(checkContainerStartedMethod)); }
AwsEC2Container extends AwsContainer { @ChaosExperiment(experimentType = ExperimentType.STATE) public void stopContainer (Experiment experiment) { awsEC2Platform.stopInstance(instanceId); experiment.setSelfHealingMethod(autoscalingSelfHealingWrapper(startContainerMethod)); experiment.setCheckContainerHealth(autoscalingHealthcheckWrapper(checkContainerStartedMethod)); } }
AwsEC2Container extends AwsContainer { @ChaosExperiment(experimentType = ExperimentType.STATE) public void stopContainer (Experiment experiment) { awsEC2Platform.stopInstance(instanceId); experiment.setSelfHealingMethod(autoscalingSelfHealingWrapper(startContainerMethod)); experiment.setCheckContainerHealth(autoscalingHealthcheckWrapper(checkContainerStartedMethod)); } private  AwsEC2Container(); }
AwsEC2Container extends AwsContainer { @ChaosExperiment(experimentType = ExperimentType.STATE) public void stopContainer (Experiment experiment) { awsEC2Platform.stopInstance(instanceId); experiment.setSelfHealingMethod(autoscalingSelfHealingWrapper(startContainerMethod)); experiment.setCheckContainerHealth(autoscalingHealthcheckWrapper(checkContainerStartedMethod)); } private  AwsEC2Container(); static AwsEC2ContainerBuilder builder(); String getInstanceId(); String getGroupIdentifier(); String getKeyName(); String getName(); boolean isSSHCapable(); String getImageId(); @Override Platform getPlatform(); @Override boolean eligibleForExperiments(); @Override String getSimpleName(); @Override String getAggregationIdentifier(); @Override DataDogIdentifier getDataDogIdentifier(); @Override boolean isCattle(); @Override boolean supportsShellBasedExperiments(); @ChaosExperiment(experimentType = ExperimentType.STATE) void stopContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE) void restartContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE, experimentScope = ExperimentScope.CATTLE) void terminateASGContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.NETWORK) void removeSecurityGroups(Experiment experiment); String getRoutableAddress(); String getPublicAddress(); }
AwsEC2Container extends AwsContainer { @ChaosExperiment(experimentType = ExperimentType.STATE) public void stopContainer (Experiment experiment) { awsEC2Platform.stopInstance(instanceId); experiment.setSelfHealingMethod(autoscalingSelfHealingWrapper(startContainerMethod)); experiment.setCheckContainerHealth(autoscalingHealthcheckWrapper(checkContainerStartedMethod)); } private  AwsEC2Container(); static AwsEC2ContainerBuilder builder(); String getInstanceId(); String getGroupIdentifier(); String getKeyName(); String getName(); boolean isSSHCapable(); String getImageId(); @Override Platform getPlatform(); @Override boolean eligibleForExperiments(); @Override String getSimpleName(); @Override String getAggregationIdentifier(); @Override DataDogIdentifier getDataDogIdentifier(); @Override boolean isCattle(); @Override boolean supportsShellBasedExperiments(); @ChaosExperiment(experimentType = ExperimentType.STATE) void stopContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE) void restartContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE, experimentScope = ExperimentScope.CATTLE) void terminateASGContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.NETWORK) void removeSecurityGroups(Experiment experiment); String getRoutableAddress(); String getPublicAddress();  }