changeset 6604:f89dba9ea7c7

tests: add workaround for failing manual vcs tests test_ip_restriction_* Back out a part of ee88c8c07111; invalidate_all_caches would expire beaker caches ... but that doesn't work so well for expiring the cache in the separate server process used for vcs tests.
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 03 May 2017 03:41:45 +0200
parents fd9b2d83d52b
children 52e689b37700
files kallithea/tests/other/manual_test_vcs_operations.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/tests/other/manual_test_vcs_operations.py	Wed Apr 12 18:30:23 2017 +0200
+++ b/kallithea/tests/other/manual_test_vcs_operations.py	Wed May 03 03:41:45 2017 +0200
@@ -526,8 +526,8 @@
                 UserIpMap.delete(ip.ip_id)
             Session().commit()
 
-        # IP permissions are cached, need to invalidate this cache explicitly
-        invalidate_all_caches()
+        # IP permissions are cached, need to wait for the cache in the server process to expire
+        time.sleep(1.5)
 
         clone_url = _construct_url(HG_REPO)
         stdout, stderr = Command(tempfile.gettempdir()).execute('hg clone', clone_url)
@@ -554,8 +554,8 @@
                 UserIpMap.delete(ip.ip_id)
             Session().commit()
 
-        # IP permissions are cached, need to invalidate this cache explicitly
-        invalidate_all_caches()
+        # IP permissions are cached, need to wait for the cache in the server process to expire
+        time.sleep(1.5)
 
         clone_url = _construct_url(GIT_REPO)
         stdout, stderr = Command(tempfile.gettempdir()).execute('git clone', clone_url)