Here is what I was referring to, in my last comment, when I said see my comments about a pre-determind call count. I'd made that comment in email but apparently Launchpad did not include it in the above comment grrrr
> + pause_timeout = 1 if pause_timeout <= 0 else pause_timeout
>
Total_run is a count used in the for loop to call run_random_chaos a
predetermined number of times?
If the random chaos functions take varying time to run, especially as
additional functions are added, it might make sense to check if the
run_timeout has been reached before making the next run_random_chaos call.
(this is not required for merge, just a suggestion)
> + total_run = int(run_timeout/pause_timeout)
> + cm = ChaosMonkey.factory()
> + for _ in xrange(total_run):
> + cm.run_random_chaos(pause_timeout)
> + if not is_juju_ok():
> + report_juju_error()
> + break
> + cm.shutdown()
Here is what I was referring to, in my last comment, when I said see my comments about a pre-determind call count. I'd made that comment in email but apparently Launchpad did not include it in the above comment grrrr
> + pause_timeout = 1 if pause_timeout <= 0 else pause_timeout
>
Total_run is a count used in the for loop to call run_random_chaos a
predetermined number of times?
If the random chaos functions take varying time to run, especially as
additional functions are added, it might make sense to check if the
run_timeout has been reached before making the next run_random_chaos call.
(this is not required for merge, just a suggestion)
> + total_run = int(run_ timeout/ pause_timeout) factory( ) random_ chaos(pause_ timeout)
> + cm = ChaosMonkey.
> + for _ in xrange(total_run):
> + cm.run_
> + if not is_juju_ok():
> + report_juju_error()
> + break
> + cm.shutdown()