From f5822f4aa2e8eb6c9838b0e2f73f53c5c2968977 Mon Sep 17 00:00:00 2001 From: Samuel Spagl Date: Tue, 6 Sep 2022 23:17:17 +0200 Subject: [PATCH] small changes in `runner.py` --- locust/runners.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/locust/runners.py b/locust/runners.py index 97faab0c7d..39ae2e88ab 100644 --- a/locust/runners.py +++ b/locust/runners.py @@ -479,7 +479,8 @@ def _start(self, user_count: int, spawn_rate: float, wait: bool = False, user_cl :param wait: If True calls to this method will block until all users are spawned. If False (the default), a greenlet that spawns the users will be started and the call to this method will return immediately. - :param user_classes: The user classes to be dispatched + :param user_classes: The user classes to be dispatched, None indicates to use the classes the dispatcher was + invoked with. """ self.target_user_count = user_count @@ -494,8 +495,6 @@ def _start(self, user_count: int, spawn_rate: float, wait: bool = False, user_cl if wait and user_count - self.user_count > spawn_rate: raise ValueError("wait is True but the amount of users to add is greater than the spawn rate") - # if user_classes is None: - # user_classes = self.user_classes for user_class in self.user_classes: if self.environment.host: @@ -756,9 +755,6 @@ def start( logger.warning("You can't start a distributed test before at least one worker processes has connected") return - # if user_classes is None: - # user_classes = self.user_classes - for user_class in self.user_classes: if self.environment.host: user_class.host = self.environment.host