Commit 908ad14c authored by Arnaud Fontaine's avatar Arnaud Fontaine

Execution with a range of users should follow --max-errors as well

parent 4b39b58d
...@@ -277,26 +277,28 @@ class PerformanceTester(object): ...@@ -277,26 +277,28 @@ class PerformanceTester(object):
return ((), 0) return ((), 0)
def run(self): def run(self):
error_message_set, exit_status = (), 0 error_message_set, exit_status = set(), 0
self.preRun() self.preRun()
if isinstance(self._argument_namespace.users, tuple): if isinstance(self._argument_namespace.users, tuple):
min_user_number, max_user_number = self._argument_namespace.users min_user_number, max_user_number = self._argument_namespace.users
repeat_counter = 0 repeat_counter = 0
exit_with_error = False error_counter = 0
while (repeat_counter != self._argument_namespace.repeat_range and while (repeat_counter != self._argument_namespace.repeat_range and
not exit_with_error): error_counter != self._argument_namespace.max_error_number):
current_user_number = min_user_number current_user_number = min_user_number
while True: while True:
error_message_set, exit_status = \ current_error_message_set, exit_status = \
self._run_constant(current_user_number, repeat_counter) self._run_constant(current_user_number, repeat_counter)
if exit_status != 0: if exit_status != 0:
exit_with_error = True error_counter += 1
break error_message_set.update(current_error_message_set)
elif current_user_number == max_user_number:
if (current_user_number == max_user_number or
error_counter == self._argument_namespace.max_error_number):
break break
current_user_number = \ current_user_number = \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment