Changeset - 5e94c0f9720c
[Not reviewed]
default
0 2 0
Mads Kiilerich - 11 years ago 2015-02-26 23:57:38
madski@unity3d.com
tests: decrease sql_cache_short beaker config to 1 s to match hack in fixture.anon_access
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/fixture.py
Show inline comments
 
@@ -48,25 +48,25 @@ class Fixture(object):
 
        with fixture.anon_access(False):
 
            #tests
 

	
 
        after this block anon access will be set to `not status`
 
        """
 

	
 
        class context(object):
 
            def __enter__(self):
 
                anon = User.get_default_user()
 
                anon.active = status
 
                Session().add(anon)
 
                Session().commit()
 
                time.sleep(1.5)  # must sleep for cache (1s to expire)
 
                time.sleep(1.5)  # hack: wait for beaker sql_cache_short to expire
 

	
 
            def __exit__(self, exc_type, exc_val, exc_tb):
 
                anon = User.get_default_user()
 
                anon.active = not status
 
                Session().add(anon)
 
                Session().commit()
 

	
 
        return context()
 

	
 
    def _get_repo_create_params(self, **custom):
 
        defs = dict(
 
            repo_name=None,
test.ini
Show inline comments
 
@@ -312,25 +312,25 @@ beaker.cache.super_short_term.type=memor
 
beaker.cache.super_short_term.expire=10
 
beaker.cache.super_short_term.key_length = 256
 

	
 
beaker.cache.short_term.type=memory
 
beaker.cache.short_term.expire=60
 
beaker.cache.short_term.key_length = 256
 

	
 
beaker.cache.long_term.type=memory
 
beaker.cache.long_term.expire=36000
 
beaker.cache.long_term.key_length = 256
 

	
 
beaker.cache.sql_cache_short.type=memory
 
beaker.cache.sql_cache_short.expire=10
 
beaker.cache.sql_cache_short.expire=1
 
beaker.cache.sql_cache_short.key_length = 256
 

	
 
beaker.cache.sql_cache_med.type=memory
 
beaker.cache.sql_cache_med.expire=360
 
beaker.cache.sql_cache_med.key_length = 256
 

	
 
beaker.cache.sql_cache_long.type=file
 
beaker.cache.sql_cache_long.expire=3600
 
beaker.cache.sql_cache_long.key_length = 256
 

	
 
####################################
 
###       BEAKER SESSION        ####
0 comments (0 inline, 0 general)