@@ -286,7 +286,6 @@ def my_task(self):
286
286
)
287
287
) as file_path :
288
288
proc = subprocess .Popen (["locust" , "-f" , file_path , "--autostart" ], stdout = PIPE , stderr = PIPE , text = True )
289
- gevent .sleep (1 )
290
289
stdout , stderr = proc .communicate ()
291
290
self .assertIn ("parameter need to be float and value between. 0 < percentile < 1 Eg 0.95" , stderr )
292
291
self .assertEqual (1 , proc .returncode )
@@ -916,7 +915,6 @@ def t(self):
916
915
917
916
# This should not do anything since we are already at zero users
918
917
stdin .write (b"S" )
919
- gevent .sleep (1 )
920
918
921
919
output = proc .communicate ()[0 ]
922
920
stdin .close ()
@@ -1287,7 +1285,6 @@ def my_task(self):
1287
1285
with temporary_file (content = MOCK_LOCUSTFILE_CONTENT_A ) as file1 :
1288
1286
with temporary_file (content = MOCK_LOCUSTFILE_CONTENT_C ) as file2 :
1289
1287
proc = subprocess .Popen (["locust" , "-f" , f"{ file1 } ,{ file2 } " ], stdout = PIPE , stderr = PIPE , text = True )
1290
- gevent .sleep (1 )
1291
1288
stdout , stderr = proc .communicate ()
1292
1289
1293
1290
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):
1305
1302
proc = subprocess .Popen (
1306
1303
["locust" , "-f" , f"{ file1 } ,{ file2 } " , "-t" , "1" , "--headless" ], stdout = PIPE , stderr = PIPE , text = True
1307
1304
)
1308
- gevent .sleep (1 )
1309
1305
stdout , stderr = proc .communicate ()
1310
1306
1311
1307
self .assertIn ("running my_task" , stdout )
@@ -1339,7 +1335,6 @@ def tick(self):
1339
1335
with temporary_file (content = MOCK_LOCUSTFILE_CONTENT_C ) as file1 :
1340
1336
with temporary_file (content = MOCK_LOCUSTFILE_CONTENT_D ) as file2 :
1341
1337
proc = subprocess .Popen (["locust" , "-f" , f"{ file1 } ,{ file2 } " ], stdout = PIPE , stderr = PIPE , text = True )
1342
- gevent .sleep (1 )
1343
1338
stdout , stderr = proc .communicate ()
1344
1339
1345
1340
self .assertIn ("Duplicate shape classes: TestShape" , stderr )
@@ -1428,7 +1423,6 @@ def tick(self):
1428
1423
def test_error_when_locustfiles_directory_is_empty (self ):
1429
1424
with TemporaryDirectory () as temp_dir :
1430
1425
proc = subprocess .Popen (["locust" , "-f" , temp_dir ], stdout = PIPE , stderr = PIPE , text = True )
1431
- gevent .sleep (1 )
1432
1426
stdout , stderr = proc .communicate ()
1433
1427
1434
1428
self .assertIn (f"Could not find any locustfiles in directory '{ temp_dir } '" , stderr )
0 commit comments