Changeset - f89dba9ea7c7
[Not reviewed]
default
0 1 0
Mads Kiilerich - 9 years ago 2017-05-03 03:41:45
mads@kiilerich.com
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.
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/other/manual_test_vcs_operations.py
Show inline comments
 
@@ -523,14 +523,14 @@ class TestVCSOperations(TestController):
 
        finally:
 
            #release IP restrictions
 
            for ip in UserIpMap.query():
 
                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)
 

	
 
        assert 'requesting all changes' in stdout
 
        assert 'adding changesets' in stdout
 
@@ -551,14 +551,14 @@ class TestVCSOperations(TestController):
 
        finally:
 
            #release IP restrictions
 
            for ip in UserIpMap.query():
 
                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)
 

	
 
        assert 'Cloning into' in stdout + stderr
 
        assert stderr == '' or stdout == ''
0 comments (0 inline, 0 general)