[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/tests/testConnection.py Added hack to use zope.testing.doctest to allow running tests
Jim Fulton
jim at zope.com
Fri Sep 10 12:03:27 EDT 2010
Log message for revision 116295:
Added hack to use zope.testing.doctest to allow running tests
repeatedly.
Added additional debugging info to try to understand what's going on
on a rare bot test failure that I can't reproduce.
Changed:
U ZODB/trunk/src/ZEO/tests/testConnection.py
-=-
Modified: ZODB/trunk/src/ZEO/tests/testConnection.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/testConnection.py 2010-09-10 15:43:25 UTC (rev 116294)
+++ ZODB/trunk/src/ZEO/tests/testConnection.py 2010-09-10 16:03:27 UTC (rev 116295)
@@ -21,7 +21,11 @@
from ZEO.tests import ConnectionTests, InvalidationTests
from zope.testing import setupstack
-import doctest
+import os
+if os.environ.get('USE_ZOPE_TESTING_DOCTEST'):
+ from zope.testing import doctest
+else:
+ import doctest
import unittest
import ZEO.tests.forker
import ZEO.tests.testMonitor
@@ -191,6 +195,8 @@
>>> import zope.testing.loggingsupport, logging
>>> handler = zope.testing.loggingsupport.InstalledHandler(
... 'ZEO', level=logging.ERROR)
+ >>> debughandler = zope.testing.loggingsupport.InstalledHandler(
+ ... 'ZEO', level=logging.DEBUG)
>>> bad = False
>>> try:
@@ -218,6 +224,11 @@
>>> if bad:
... print open('server-%s.log' % addr[1]).read()
+ ... print 'client debug log'
+ ... for record in debughandler.records:
+ ... print record.name, record.levelname
+ ... print debughandler.format(record)
+ >>> debughandler.uninstall()
>>> thread.isAlive()
False
More information about the Zodb-checkins
mailing list