Commit 00c2e4c9 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

configure distributed ram cache for test_03_MemcachedDistributedSession.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27592 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cc8c45eb
......@@ -60,6 +60,14 @@ class TestSessionTool(ERP5TypeTestCase):
return "Session Tool"
def afterSetUp(self):
# create a Memcached Plugin
memcached_tool = self.getPortal().portal_memcached
#create Memcache Plugin
if getattr(memcached_tool, 'default_memcached_plugin', None) is None:
memcached_tool.newContent(id='default_memcached_plugin',
portal_type='Memcached Plugin',
int_index=0,
url_string='127.0.0.1:11211')
self.login()
def login(self, quiet=0, run=run_all_test):
......@@ -78,6 +86,8 @@ class TestSessionTool(ERP5TypeTestCase):
cache_plugin = session_cache_factory.newContent(portal_type=portal_type)
cache_plugin.setCacheDuration(storage_duration)
cache_plugin.setIntIndex(0)
if portal_type == 'Distributed Ram Cache':
cache_plugin.edit(specialise='portal_memcached/default_memcached_plugin')
get_transaction().commit()
portal_caches.updateCache()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment