# HG changeset patch # User Mads Kiilerich # Date 2017-05-03 03:41:45 # Node ID f89dba9ea7c766aaa2e1a289745664b8da4bfb8d # Parent fd9b2d83d52b6dfb6f4c0754aecbc6589b45cd45 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. diff --git a/kallithea/tests/other/manual_test_vcs_operations.py b/kallithea/tests/other/manual_test_vcs_operations.py --- a/kallithea/tests/other/manual_test_vcs_operations.py +++ b/kallithea/tests/other/manual_test_vcs_operations.py @@ -526,8 +526,8 @@ class TestVCSOperations(TestController): 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 @@ class TestVCSOperations(TestController): 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)