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:
Clay Gerrard
committed by
Alistair Coles
parent
c9f8246378
commit
e0307f950b
1 changed files with 1 additions and 6 deletions
@@ -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,11 +110,7 @@ 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()
self.memcache = FakeMemcache()
# swift.conf contents for in-process functional test runs
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.