Commit a75cce21 authored by Jeremy Hylton's avatar Jeremy Hylton

Call super setUp() right away, because it sets _storage to None.

Let super tearDown() close the storage.

Tracking changes to ZODB/tests/StorageTestBase.
parent 2df33580
...@@ -143,18 +143,17 @@ class GenericTests(ZEOTestBase, ...@@ -143,18 +143,17 @@ class GenericTests(ZEOTestBase,
The ZEO server uses the storage object returned by the The ZEO server uses the storage object returned by the
getStorage() method. getStorage() method.
""" """
self.__super_setUp()
self.running = 1 self.running = 1
client, exit, pid = forker.start_zeo(self.getStorage()) client, exit, pid = forker.start_zeo(self.getStorage())
self._pid = pid self._pid = pid
self._server = exit self._server = exit
self._storage = PackWaitWrapper(client) self._storage = PackWaitWrapper(client)
client.registerDB(DummyDB(), None) client.registerDB(DummyDB(), None)
self.__super_setUp()
def tearDown(self): def tearDown(self):
"""Try to cause the tests to halt""" """Try to cause the tests to halt"""
self.running = 0 self.running = 0
self._storage.close()
self._server.close() self._server.close()
os.waitpid(self._pid, 0) os.waitpid(self._pid, 0)
self.delStorage() self.delStorage()
......
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