From fb202aaf3e3bc03fd7cb6f6f5448e3c2a2c52e9a Mon Sep 17 00:00:00 2001 From: Shay Palachy Date: Wed, 26 Apr 2017 12:30:09 +0300 Subject: [PATCH] safer timing for mongo being_calc test --- tests/test_mongo_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_mongo_core.py b/tests/test_mongo_core.py index 745e095..4255a95 100644 --- a/tests/test_mongo_core.py +++ b/tests/test_mongo_core.py @@ -101,7 +101,7 @@ def test_mongo_stale_after(): @cachier(mongetter=_test_mongetter) def _takes_time(arg_1, arg_2): """Some function.""" - sleep(2) + sleep(3) return random() + arg_1 + arg_2 def _calls_takes_time(res_queue): @@ -117,7 +117,7 @@ def test_mongo_being_calculated(): thread2 = threading.Thread( target=_calls_takes_time, kwargs={'res_queue': res_queue}) thread1.start() - sleep(0.5) + sleep(1) thread2.start() thread1.join() thread2.join()