From ea8abab9ad0e363f0834ef0240f6a929f3f39ecb Mon Sep 17 00:00:00 2001 From: caleb Date: Wed, 4 Sep 2024 08:37:18 -0400 Subject: [PATCH] no reason to sleep, just run the job --- tests/api2/test_cronjob.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/api2/test_cronjob.py b/tests/api2/test_cronjob.py index 6d98c826db4e8..683a829f41f2a 100644 --- a/tests/api2/test_cronjob.py +++ b/tests/api2/test_cronjob.py @@ -1,5 +1,3 @@ -from time import sleep - from middlewared.test.integration.utils import call, ssh TESTFILE = '/mnt/cronjob_testfile' @@ -20,8 +18,7 @@ def test_cron_job(): except Exception as e: assert False, f'Unexpected failure: {str(e)}' - # sleep and verify cronjob ran - sleep(65) + call('cronjob.run', id, job=True) assert call('filesystem.statfs', TESTFILE)['blocksize'] results = ssh(f'rm "{TESTFILE}"', complete_response=True)