Skip to content

Commit

Permalink
Add test for patch version mismatch logging
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed Nov 3, 2021
1 parent 4bb2d97 commit bb19203
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions locust/test/test_runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -1684,6 +1684,11 @@ def test_worker_connect_with_special_versions(self):
server.mocked_send(Message("client_ready", -1, "version_check_bypass_should_not_warn"))
self.assertEqual(1, len(self.mocked_log.warning))
self.assertEqual(2, len(master.clients))
server.mocked_send(
Message("client_ready", __version__ + "1", "difference_in_patch_version_should_not_warn")
)
self.assertEqual(3, len(master.clients))
self.assertEqual(1, len(self.mocked_log.warning))

def test_worker_stats_report_median(self):
with mock.patch("locust.rpc.rpc.Server", mocked_rpc()) as server:
Expand Down

0 comments on commit bb19203

Please sign in to comment.