From b5db9d146171a7ab6a8fd747eaae33490c5c3f08 Mon Sep 17 00:00:00 2001 From: Ilya Chuvaev Date: Sat, 16 Mar 2024 13:22:30 +0300 Subject: [PATCH] test deferred asert same by seconds --- tests/test_deferred.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_deferred.py b/tests/test_deferred.py index 2277271..f33d8e1 100644 --- a/tests/test_deferred.py +++ b/tests/test_deferred.py @@ -25,7 +25,7 @@ async def test_deferred() -> None: await queue.register( DropBucket, BucketRequest(1), - defer=timedelta(milliseconds=10), + defer=timedelta(seconds=2), ) deferred_pipe: str = Tube(DeferredHandler, Route()).pipe @@ -39,7 +39,7 @@ async def test_deferred() -> None: await queue.register( DropBucket, BucketRequest(1), - defer=timedelta(milliseconds=5), + defer=timedelta(seconds=1), ) assert await queue.storage.length(drop_pipe) == 0 @@ -54,7 +54,7 @@ async def test_deferred() -> None: timestamp_order = await queue.storage.range(deferred_pipe, 2) assert list(reversed(append_order)) == timestamp_order - await sleep(0.01) + await sleep(2) await worker.loop(2) assert await queue.storage.length(drop_pipe) == 1