-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Rename slave to worker (except changelog) #1303
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1303 +/- ##
==========================================
+ Coverage 79.60% 79.69% +0.08%
==========================================
Files 23 23
Lines 2079 2093 +14
Branches 323 325 +2
==========================================
+ Hits 1655 1668 +13
+ Misses 342 338 -4
- Partials 82 87 +5
Continue to review full report at Codecov.
|
I think this is ready for review for now. This is my first PR (still learning Python) please be gentle ;:) |
Looks good to me! I dont have time to test it extensively atm, but I'll merge this tomorrow, if nobody objects (@heyman ?), and do some tests next week. |
Could you add a hidden argument (https://stackoverflow.com/questions/11114589/creating-hidden-arguments-with-python-argparse) for —slave that just throws an exception, pointing people to the —worker argument? |
@cyberw Updated, let me know if the exception message makes sense or not. |
locust/static/locust.js
Outdated
@@ -164,7 +164,7 @@ function updateStats() { | |||
window.report = report; | |||
|
|||
renderTable(report); | |||
renderSlaveTable(report); | |||
renderworkerTable(report); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize 'w'
locust/static/locust.js
Outdated
renderSlaveTable(window.report); | ||
workerSortAttribute = $(this).attr("data-sortkey"); | ||
workerDesc = !workerDesc; | ||
renderworkerTable(window.report); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize 'w'
locust/static/locust.js
Outdated
if (report.slaves) { | ||
var slaves = (report.slaves).sort(sortBy(slaveSortAttribute, slaveDesc)); | ||
$("#slaves tbody").empty(); | ||
function renderworkerTable(report) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize 'w'
locust/test/test_runners.py
Outdated
@@ -658,21 +658,21 @@ class MyLocust(Locust): | |||
self.assertEqual(2, exception["count"]) | |||
|
|||
|
|||
class TestSlaveLocustRunner(LocustTestCase): | |||
class TestworkerLocustRunner(LocustTestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize 'w'
locust/test/test_runners.py
Outdated
def setUp(self): | ||
super(TestSlaveLocustRunner, self).setUp() | ||
super(TestworkerLocustRunner, self).setUp() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize 'w'
locust/test/test_runners.py
Outdated
#self._report_to_master_event_handlers = [h for h in events.report_to_master._handlers] | ||
|
||
def tearDown(self): | ||
#events.report_to_master._handlers = self._report_to_master_event_handlers | ||
super(TestSlaveLocustRunner, self).tearDown() | ||
super(TestworkerLocustRunner, self).tearDown() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalize 'w'
locust/web.py
Outdated
slave_count=slave_count, | ||
is_step_load=environment.step_load, | ||
) | ||
state=environment.runner.state, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like some unnecessary whitespace here and below?
Thanks! |
#220 Rename slave to worker