Skip to content

Commit

Permalink
Remove check for --expect-workers-max-wait without --expect-workers (…
Browse files Browse the repository at this point in the history
…it was broken and doesnt really make sense anyway)

Log an error and crash if --expect-workers is not a positive number (otherwise we'll just wait forever).
  • Loading branch information
cyberw committed May 6, 2024
1 parent e290263 commit 8b6e954
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions locust/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ def ensure_user_class_name(config):
if options.worker:
logger.error("The --master argument cannot be combined with --worker")
sys.exit(-1)
if options.expect_workers_max_wait and not options.expect_workers:
logger.error("The --expect-workers-max-wait argument only makes sense when combined with --expect-workers")
if options.expect_workers < 1:
logger.error(f"Invalid --expect-workers argument ({options.expect_workers}), must be a positive number")
sys.exit(-1)
runner = environment.create_master_runner(
master_bind_host=options.master_bind_host,
Expand Down

0 comments on commit 8b6e954

Please sign in to comment.