Always use FakeMemcache for in-process tests
Better isolation and consistency for in-process functests to always use the FakeMemcache. If you want to test the real memcache you have real functional tests. Change-Id: Ic483f794e122130bd7694c9a5f9a2b1cd0b9a653
This commit is contained in:
parent
c9f8246378
commit
e0307f950b
@ -31,7 +31,6 @@ from contextlib import closing
|
||||
from gzip import GzipFile
|
||||
from shutil import rmtree
|
||||
from tempfile import mkdtemp
|
||||
from swift.common.memcached import MemcacheConnectionError
|
||||
from swift.common.middleware.memcache import MemcacheMiddleware
|
||||
|
||||
from test import get_config
|
||||
@ -111,10 +110,6 @@ class FakeMemcacheMiddleware(MemcacheMiddleware):
|
||||
|
||||
def __init__(self, app, conf):
|
||||
super(FakeMemcacheMiddleware, self).__init__(app, conf)
|
||||
try:
|
||||
self.memcache.incr('test_for_memcached_running')
|
||||
except MemcacheConnectionError as e:
|
||||
print >>sys.stderr, 'Using FakeMemcache: %s' % e.message
|
||||
self.memcache = FakeMemcache()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user