Commit 69e3f02f authored by Julien Muchembled's avatar Julien Muchembled

tests: compatibility with recent ZEO

parent 992c67b1
...@@ -1300,11 +1300,7 @@ def dummy_tearDown(self): ...@@ -1300,11 +1300,7 @@ def dummy_tearDown(self):
self._clear(1) self._clear(1)
class ZEOServerTestCase(ERP5TypeTestCase): class ZEOServerTestCase(ERP5TypeTestCase):
"""TestCase class to run a ZEO storage """TestCase class to run a ZEO storage"""
Main method is 'asyncore_loop' (inherited) since there is nothing to do
except processing I/O.
"""
def setUp(self): def setUp(self):
# Start ZEO storage and send address to parent process if any. # Start ZEO storage and send address to parent process if any.
...@@ -1323,6 +1319,14 @@ class ZEOServerTestCase(ERP5TypeTestCase): ...@@ -1323,6 +1319,14 @@ class ZEOServerTestCase(ERP5TypeTestCase):
os.close(zeo_client) os.close(zeo_client)
ZopeTestCase._print("\nZEO Storage started at %s:%s ... " % host_port) ZopeTestCase._print("\nZEO Storage started at %s:%s ... " % host_port)
def asyncore_loop(self):
try:
self.zeo_server.loop()
except AttributeError: # BBB
super(ZEOServerTestCase, self).asyncore_loop()
except KeyboardInterrupt:
pass
def tearDown(self): def tearDown(self):
self.zeo_server.close_server() self.zeo_server.close_server()
......
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