diff --git a/tests/acceptance/test_async.py b/tests/acceptance/test_async.py index 4056f4f07..953337d43 100644 --- a/tests/acceptance/test_async.py +++ b/tests/acceptance/test_async.py @@ -112,14 +112,14 @@ async def test_abort(async_app): @async_app.task(queue="default", name="task1", pass_context=True) async def task1(context): while True: - await asyncio.sleep(0.1) + await asyncio.sleep(0.02) if await context.should_abort_async(): raise JobAborted @async_app.task(queue="default", name="task2", pass_context=True) def task2(context): while True: - time.sleep(0.1) + time.sleep(0.02) if context.should_abort(): raise JobAborted @@ -130,11 +130,11 @@ def task2(context): async_app.run_worker_async(queues=["default"], wait=False) ) - await asyncio.sleep(0.1) + await asyncio.sleep(0.05) result = await async_app.job_manager.cancel_job_by_id_async(job1_id, abort=True) assert result is True - await asyncio.sleep(0.1) + await asyncio.sleep(0.05) result = await async_app.job_manager.cancel_job_by_id_async(job2_id, abort=True) assert result is True