adding temp dir thing

This commit is contained in:
David Goetz 2010-11-16 11:06:39 -08:00
parent aed24cf328
commit dcd3743def

View File

@ -23,6 +23,7 @@ import cPickle as pickle
import logging
import fcntl
import time
import tempfile
from contextlib import contextmanager
from eventlet import tpool
@ -131,7 +132,7 @@ class TestObjectReplicator(unittest.TestCase):
def setUp(self):
# Setup a test ring (stolen from common/test_ring.py)
self.testdir = os.path.join('/dev/shm', 'test_replicator')
self.testdir = tempfile.mkdtemp()
self.devices = os.path.join(self.testdir, 'node')
rmtree(self.testdir, ignore_errors=1)
os.mkdir(self.testdir)