Remove obviously meaningless sleeps

This commit is contained in:
Lars Holmberg 2025-03-09 17:25:54 +01:00
parent fbf0a4243b
commit a36b15713e
1 changed files with 0 additions and 6 deletions

View File

@ -286,7 +286,6 @@ class StandaloneIntegrationTests(ProcessIntegrationTest):
)
) as file_path:
proc = subprocess.Popen(["locust", "-f", file_path, "--autostart"], stdout=PIPE, stderr=PIPE, text=True)
gevent.sleep(1)
stdout, stderr = proc.communicate()
self.assertIn("parameter need to be float and value between. 0 < percentile < 1 Eg 0.95", stderr)
self.assertEqual(1, proc.returncode)
@ -916,7 +915,6 @@ class StandaloneIntegrationTests(ProcessIntegrationTest):
# This should not do anything since we are already at zero users
stdin.write(b"S")
gevent.sleep(1)
output = proc.communicate()[0]
stdin.close()
@ -1287,7 +1285,6 @@ class StandaloneIntegrationTests(ProcessIntegrationTest):
with temporary_file(content=MOCK_LOCUSTFILE_CONTENT_A) as file1:
with temporary_file(content=MOCK_LOCUSTFILE_CONTENT_C) as file2:
proc = subprocess.Popen(["locust", "-f", f"{file1},{file2}"], stdout=PIPE, stderr=PIPE, text=True)
gevent.sleep(1)
stdout, stderr = proc.communicate()
self.assertIn("Duplicate user class names: TestUser1 is defined", stderr)
@ -1305,7 +1302,6 @@ class StandaloneIntegrationTests(ProcessIntegrationTest):
proc = subprocess.Popen(
["locust", "-f", f"{file1},{file2}", "-t", "1", "--headless"], stdout=PIPE, stderr=PIPE, text=True
)
gevent.sleep(1)
stdout, stderr = proc.communicate()
self.assertIn("running my_task", stdout)
@ -1339,7 +1335,6 @@ class StandaloneIntegrationTests(ProcessIntegrationTest):
with temporary_file(content=MOCK_LOCUSTFILE_CONTENT_C) as file1:
with temporary_file(content=MOCK_LOCUSTFILE_CONTENT_D) as file2:
proc = subprocess.Popen(["locust", "-f", f"{file1},{file2}"], stdout=PIPE, stderr=PIPE, text=True)
gevent.sleep(1)
stdout, stderr = proc.communicate()
self.assertIn("Duplicate shape classes: TestShape", stderr)
@ -1428,7 +1423,6 @@ class StandaloneIntegrationTests(ProcessIntegrationTest):
def test_error_when_locustfiles_directory_is_empty(self):
with TemporaryDirectory() as temp_dir:
proc = subprocess.Popen(["locust", "-f", temp_dir], stdout=PIPE, stderr=PIPE, text=True)
gevent.sleep(1)
stdout, stderr = proc.communicate()
self.assertIn(f"Could not find any locustfiles in directory '{temp_dir}'", stderr)