Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

Commit

Permalink
The original condition should be returned in addition to the new one …
Browse files Browse the repository at this point in the history
…since unit-test will otherwise fail:

the reason for that is that the unit-test checks two things:
1. selected instances
2. terminated

and no instance should be selected if we reached the max.
Though the previous fix ensures that we won’t kill the chosen instance - according to the unit-test we should not even choose it (strict approach).
  • Loading branch information
alfasin committed Aug 29, 2014
1 parent 122e074 commit 4a948c1
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -109,6 +109,9 @@ public void doMonkeyBusiness() {
}
for (InstanceGroup group : context().chaosCrawler().groups()) {
if (isGroupEnabled(group)) {
if (isMaxTerminationCountExceeded(group)) {
continue;
}
double prob = getEffectiveProbability(group);
Collection<String> instances = context().chaosInstanceSelector().select(group, prob / runsPerDay);
for (String inst : instances) {
Expand Down

0 comments on commit 4a948c1

Please sign in to comment.