Commit 3367e586 authored by Jim Fulton's avatar Jim Fulton

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.
parent efe52a90
...@@ -21,7 +21,11 @@ from __future__ import with_statement ...@@ -21,7 +21,11 @@ from __future__ import with_statement
from ZEO.tests import ConnectionTests, InvalidationTests from ZEO.tests import ConnectionTests, InvalidationTests
from zope.testing import setupstack 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 unittest
import ZEO.tests.forker import ZEO.tests.forker
import ZEO.tests.testMonitor import ZEO.tests.testMonitor
...@@ -191,6 +195,8 @@ This tests tries to provoke this bug by: ...@@ -191,6 +195,8 @@ This tests tries to provoke this bug by:
>>> import zope.testing.loggingsupport, logging >>> import zope.testing.loggingsupport, logging
>>> handler = zope.testing.loggingsupport.InstalledHandler( >>> handler = zope.testing.loggingsupport.InstalledHandler(
... 'ZEO', level=logging.ERROR) ... 'ZEO', level=logging.ERROR)
>>> debughandler = zope.testing.loggingsupport.InstalledHandler(
... 'ZEO', level=logging.DEBUG)
>>> bad = False >>> bad = False
>>> try: >>> try:
...@@ -218,6 +224,11 @@ This tests tries to provoke this bug by: ...@@ -218,6 +224,11 @@ This tests tries to provoke this bug by:
>>> if bad: >>> if bad:
... print open('server-%s.log' % addr[1]).read() ... 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() >>> thread.isAlive()
False False
......
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