[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/tests/testZEO.py Tweaked the multi-processing test to run in it's own layer, to reduce
Jim Fulton
jim at zope.com
Tue Feb 2 11:50:48 EST 2010
Log message for revision 108721:
Tweaked the multi-processing test to run in it's own layer, to reduce
chance of affecting other tests, at least when run in a separate
process via the -j runner option.
Changed:
U ZODB/trunk/src/ZEO/tests/testZEO.py
-=-
Modified: ZODB/trunk/src/ZEO/tests/testZEO.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/testZEO.py 2010-02-02 16:50:46 UTC (rev 108720)
+++ ZODB/trunk/src/ZEO/tests/testZEO.py 2010-02-02 16:50:48 UTC (rev 108721)
@@ -1268,9 +1268,15 @@
class MultiprocessingTests(unittest.TestCase):
+ layer = ZODB.tests.util.MininalTestLayer('work_with_multiprocessing')
+
def test_work_with_multiprocessing(self):
"Client storage should work with multi-processing."
+ # Gaaa, zope.testing.runner.FakeInputContinueGenerator has no close
+ if not hasattr(sys.stdin, 'close'):
+ sys.stdin.close = lambda : None
+
self.globs = {}
forker.setUp(self)
addr, adminaddr = self.globs['start_server']()
@@ -1364,7 +1370,6 @@
# unit test layer
zeo = unittest.TestSuite()
zeo.addTest(unittest.makeSuite(ZODB.tests.util.AAAA_Test_Runner_Hack))
- zeo.addTest(unittest.makeSuite(MultiprocessingTests))
zeo.addTest(doctest.DocTestSuite(
setUp=forker.setUp, tearDown=zope.testing.setupstack.tearDown))
zeo.addTest(doctest.DocTestSuite(ZEO.tests.IterationTests,
@@ -1388,6 +1393,8 @@
zeo.layer = ZODB.tests.util.MininalTestLayer('testZeo-misc')
suite.addTest(zeo)
+ suite.addTest(unittest.makeSuite(MultiprocessingTests))
+
# Put the heavyweights in their own layers
for klass in slow_test_classes:
sub = unittest.makeSuite(klass, "check")
More information about the Zodb-checkins
mailing list