From c254f2e7e1be90ba0ce3b8f410c7d84c668cf4aa Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Thu, 5 May 2011 16:52:47 +0200
Subject: [PATCH] Use _getPersistentMemcachedServerDict in order to configure
 distributed cache plugins correctly

---
 product/ERP5Type/tests/testCacheTool.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Type/tests/testCacheTool.py b/product/ERP5Type/tests/testCacheTool.py
index bf65beec8b..9ec96c9e98 100644
--- a/product/ERP5Type/tests/testCacheTool.py
+++ b/product/ERP5Type/tests/testCacheTool.py
@@ -32,6 +32,7 @@ import unittest
 
 from Testing import ZopeTestCase
 from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
+from Products.ERP5Type.tests.ERP5TypeTestCase import _getPersistentMemcachedServerDict
 from Products.ERP5Type.CachePlugins.DummyCache import DummyCache
 from AccessControl.SecurityManagement import newSecurityManager
 from Products.ERP5Type.Cache import CachingMethod
@@ -98,9 +99,11 @@ class TestCacheTool(ERP5TypeTestCase):
     portal_memcached = self.getPortal().portal_memcached
     memcached_plugin_id = 'flare'
     if getattr(portal_memcached, memcached_plugin_id, None) is None:
+      connection_dict = _getPersistentMemcachedServerDict()
+      url_string = '%(hostname)s:%(port)s' % connection_dict
       portal_memcached.newContent(portal_type='Memcached Plugin',
                                   id=memcached_plugin_id,
-                                  url_string='127.0.0.1:12121',
+                                  url_string=url_string,
                                   server_max_key_length=0,
                                   server_max_value_length=0,
                                   priority=1)
-- 
2.30.9