Skip to content

Commit a36b157

Browse files
committed
Remove obviously meaningless sleeps
1 parent fbf0a42 commit a36b157

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

Diff for: locust/test/test_main.py

-6
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ def my_task(self):
286286
)
287287
) as file_path:
288288
proc = subprocess.Popen(["locust", "-f", file_path, "--autostart"], stdout=PIPE, stderr=PIPE, text=True)
289-
gevent.sleep(1)
290289
stdout, stderr = proc.communicate()
291290
self.assertIn("parameter need to be float and value between. 0 < percentile < 1 Eg 0.95", stderr)
292291
self.assertEqual(1, proc.returncode)
@@ -916,7 +915,6 @@ def t(self):
916915

917916
# This should not do anything since we are already at zero users
918917
stdin.write(b"S")
919-
gevent.sleep(1)
920918

921919
output = proc.communicate()[0]
922920
stdin.close()
@@ -1287,7 +1285,6 @@ def my_task(self):
12871285
with temporary_file(content=MOCK_LOCUSTFILE_CONTENT_A) as file1:
12881286
with temporary_file(content=MOCK_LOCUSTFILE_CONTENT_C) as file2:
12891287
proc = subprocess.Popen(["locust", "-f", f"{file1},{file2}"], stdout=PIPE, stderr=PIPE, text=True)
1290-
gevent.sleep(1)
12911288
stdout, stderr = proc.communicate()
12921289

12931290
self.assertIn("Duplicate user class names: TestUser1 is defined", stderr)
@@ -1305,7 +1302,6 @@ def test_no_error_when_same_userclass_in_two_files(self):
13051302
proc = subprocess.Popen(
13061303
["locust", "-f", f"{file1},{file2}", "-t", "1", "--headless"], stdout=PIPE, stderr=PIPE, text=True
13071304
)
1308-
gevent.sleep(1)
13091305
stdout, stderr = proc.communicate()
13101306

13111307
self.assertIn("running my_task", stdout)
@@ -1339,7 +1335,6 @@ def tick(self):
13391335
with temporary_file(content=MOCK_LOCUSTFILE_CONTENT_C) as file1:
13401336
with temporary_file(content=MOCK_LOCUSTFILE_CONTENT_D) as file2:
13411337
proc = subprocess.Popen(["locust", "-f", f"{file1},{file2}"], stdout=PIPE, stderr=PIPE, text=True)
1342-
gevent.sleep(1)
13431338
stdout, stderr = proc.communicate()
13441339

13451340
self.assertIn("Duplicate shape classes: TestShape", stderr)
@@ -1428,7 +1423,6 @@ def tick(self):
14281423
def test_error_when_locustfiles_directory_is_empty(self):
14291424
with TemporaryDirectory() as temp_dir:
14301425
proc = subprocess.Popen(["locust", "-f", temp_dir], stdout=PIPE, stderr=PIPE, text=True)
1431-
gevent.sleep(1)
14321426
stdout, stderr = proc.communicate()
14331427

14341428
self.assertIn(f"Could not find any locustfiles in directory '{temp_dir}'", stderr)

0 commit comments

Comments
 (0)