changeset b974f1e90fc9 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=b974f1e90fc9
description:
Wait up to 10 seconds for cache sync in tests
On busy host, it may require some time to receive the notification.
issue8198
review269141003
diffstat:
trytond/tests/test_cache.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (15 lines):
diff -r 50a3da2deefd -r b974f1e90fc9 trytond/tests/test_cache.py
--- a/trytond/tests/test_cache.py Fri Mar 15 13:37:17 2019 +0100
+++ b/trytond/tests/test_cache.py Sat Mar 16 14:56:32 2019 +0100
@@ -97,7 +97,10 @@
self.assertEqual(cache.get('foo'), 'bar')
transaction2.commit()
- self.wait_cache_sync()
+ for n in range(10):
+ if cache.get('foo') is None:
+ break
+ self.wait_cache_sync()
self.assertEqual(cache.get('foo'), None)
def test_memory_cache_sync(self):