@Test @Repeat(value = 10) @SuppressWarnings("unchecked") public void getSomeMembers () { Set<String> members = new HashSet<>(); String instanceId1 = UUID.randomUUID().toString(); String instanceId2 = UUID.randomUUID().toString(); members.add(instanceId1); members.add(instanceId2); when(awsRDSClusterContainer.getMembers()).thenReturn(members); assertThat(awsRDSClusterContainer.getSomeMembers(), isOneOf(Collections.singleton(instanceId1), Collections.singleton(instanceId2))); String instanceId3 = UUID.randomUUID().toString(); members.add(instanceId3); Set<Set<String>> validSets; Set<String> set12 = new HashSet<>(Arrays.asList(instanceId1, instanceId2)); Set<String> set21 = new HashSet<>(Arrays.asList(instanceId2, instanceId1)); Set<String> set13 = new HashSet<>(Arrays.asList(instanceId1, instanceId3)); Set<String> set31 = new HashSet<>(Arrays.asList(instanceId1, instanceId1)); Set<String> set23 = new HashSet<>(Arrays.asList(instanceId2, instanceId3)); Set<String> set32 = new HashSet<>(Arrays.asList(instanceId3, instanceId2)); validSets = new HashSet<>(Arrays.asList(set12, set21, set13, set31, set23, set32, Collections.singleton(instanceId1), Collections .singleton(instanceId2), Collections.singleton(instanceId3))); assertThat(awsRDSClusterContainer.getSomeMembers(), isIn(validSets)); }
Set<String> getSomeMembers () { Set<String> someMembers = getSomeMembersInner(); log.info("Experiment using cluster members {}", value("experimentMembers", someMembers)); return someMembers; }
AwsRDSClusterContainer extends AwsContainer { Set<String> getSomeMembers () { Set<String> someMembers = getSomeMembersInner(); log.info("Experiment using cluster members {}", value("experimentMembers", someMembers)); return someMembers; } }
AwsRDSClusterContainer extends AwsContainer { Set<String> getSomeMembers () { Set<String> someMembers = getSomeMembersInner(); log.info("Experiment using cluster members {}", value("experimentMembers", someMembers)); return someMembers; }  }
AwsRDSClusterContainer extends AwsContainer { Set<String> getSomeMembers () { Set<String> someMembers = getSomeMembersInner(); log.info("Experiment using cluster members {}", value("experimentMembers", someMembers)); return someMembers; }  static AwsRDSClusterContainerBuilder builder(); String getEngine(); @Override Platform getPlatform(); @Override String getSimpleName(); @Override String getAggregationIdentifier(); @Override DataDogIdentifier getDataDogIdentifier(); String getDbClusterIdentifier(); @JsonIgnore Set<String> getMembers(); @ChaosExperiment(experimentType = ExperimentType.STATE) void restartInstances(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE) void startSnapshot(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE) void initiateFailover(Experiment experiment); }
AwsRDSClusterContainer extends AwsContainer { Set<String> getSomeMembers () { Set<String> someMembers = getSomeMembersInner(); log.info("Experiment using cluster members {}", value("experimentMembers", someMembers)); return someMembers; }  static AwsRDSClusterContainerBuilder builder(); String getEngine(); @Override Platform getPlatform(); @Override String getSimpleName(); @Override String getAggregationIdentifier(); @Override DataDogIdentifier getDataDogIdentifier(); String getDbClusterIdentifier(); @JsonIgnore Set<String> getMembers(); @ChaosExperiment(experimentType = ExperimentType.STATE) void restartInstances(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE) void startSnapshot(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE) void initiateFailover(Experiment experiment);  }