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

exception on empty instance group #16

Closed
coryb opened this issue Aug 27, 2012 · 0 comments
Closed

exception on empty instance group #16

coryb opened this issue Aug 27, 2012 · 0 comments

Comments

@coryb
Copy link
Contributor

coryb commented Aug 27, 2012

Exception: n must be positive
java.lang.IllegalArgumentException: n must be positive
at java.util.Random.nextInt(Random.java:265)
at com.netflix.simianarmy.basic.chaos.BasicChaosInstanceSelector.select(BasicChaosInstanceSelector.java:61)
at com.netflix.simianarmy.basic.chaos.BasicChaosMonkey.doMonkeyBusiness(BasicChaosMonkey.java:89)

If the instance group size is 0 then we call Random.nextInt(0) which throws an exception, the argument must be > 0.

We should return null when instance group size is 0.

@coryb coryb closed this as completed Aug 27, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant