Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace locust setup teardown with events #1309

Merged
merged 4 commits into from
Apr 5, 2020

Conversation

heyman
Copy link
Member

@heyman heyman commented Apr 4, 2020

PR for #1284

…laced by events, since that makes much more sense)
Remove master_start_hatching, master_stop_hatching, locust_start_hatching and locust_stop_hatching because their purpose is very unclear. The documentation does not correspond to how they work, and there are no tests for them. The test_start and test_stop events should probably work as replacement in many cases, and I'm planning to add a user_count_change event that is fired on all worker nodes when users are hatched/killed.
@codecov
Copy link

codecov bot commented Apr 4, 2020

Codecov Report

Merging #1309 into master will increase coverage by 2.93%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1309      +/-   ##
==========================================
+ Coverage   80.21%   83.15%   +2.93%     
==========================================
  Files          23       23              
  Lines        2118     2250     +132     
  Branches      321      389      +68     
==========================================
+ Hits         1699     1871     +172     
+ Misses        339      308      -31     
+ Partials       80       71       -9     
Impacted Files Coverage Δ
locust/core.py 99.14% <ø> (+3.52%) ⬆️
locust/runners.py 87.14% <92.30%> (+11.29%) ⬆️
locust/event.py 90.00% <100.00%> (-0.63%) ⬇️
locust/exception.py 100.00% <0.00%> (ø)
locust/rpc/zmqrpc.py 93.93% <0.00%> (+9.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a0a6ef...0751f44. Read the comment docs.

Copy link
Collaborator

@cyberw cyberw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! I’m +1!

@heyman heyman marked this pull request as ready for review April 5, 2020 14:21
@heyman heyman merged commit 5f17df4 into master Apr 5, 2020
@heyman heyman deleted the replace-locust-setup-teardown-with-events branch April 14, 2020 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove the Locust.setup and Locust.teardown hooks in favour of adding test_start and test_stop events
2 participants