From 2e148ba83a345e06723c099b8a8c026fa708904d Mon Sep 17 00:00:00 2001 From: delulu Date: Wed, 6 Nov 2019 18:17:00 +0800 Subject: [PATCH] make sure locusts are spawned in local run otherwise it will exit unexpectedly --- locust/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/locust/main.py b/locust/main.py index b7bda8852d..bceedb0e07 100644 --- a/locust/main.py +++ b/locust/main.py @@ -522,6 +522,8 @@ def timelimit_stop(): runners.locust_runner.start_stepload(options.num_clients, options.hatch_rate, options.step_clients, options.step_time) elif not options.slave: runners.locust_runner.start_hatching(options.num_clients, options.hatch_rate) + # make locusts are spawned + time.sleep(1) elif not options.slave: # spawn web greenlet logger.info("Starting web monitor at http://%s:%s" % (options.web_host or "*", options.port))