Commit b6f6869c authored by Ivan Tyagov's avatar Ivan Tyagov

Use available memcached persistent server.

parent 0499be8e
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
import unittest import unittest
from testDms import TestDocument from testDms import TestDocument
from Products.ERP5Type.tests.ERP5TypeTestCase import _getPersistentMemcachedServerDict
class TestDocumentWithFlare(TestDocument): class TestDocumentWithFlare(TestDocument):
""" """
...@@ -41,7 +43,12 @@ class TestDocumentWithFlare(TestDocument): ...@@ -41,7 +43,12 @@ class TestDocumentWithFlare(TestDocument):
def setSystemPreference(self): def setSystemPreference(self):
system_preference = TestDocument.setSystemPreference(self) system_preference = TestDocument.setSystemPreference(self)
memcached = _getPersistentMemcachedServerDict()
system_preference.setPreferredConversionCacheFactory('dms_cache_factory') system_preference.setPreferredConversionCacheFactory('dms_cache_factory')
persistent_memcached_plugin = self.portal.portal_memcached.persistent_memcached_plugin
persistent_memcached_plugin.setUrlString('%s:%s' %(memcached['hostname'], memcached['port']))
self.portal.portal_caches.dms_cache_factory.persistent_cache_plugin.setSpecialiseValue(persistent_memcached_plugin)
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
......
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