[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/tests/testConnection.py adjusted debugging info
Jim Fulton
jim at zope.com
Wed Sep 22 16:54:07 EDT 2010
Log message for revision 116733:
adjusted debugging info
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-22 20:08:30 UTC (rev 116732)
+++ ZODB/trunk/src/ZEO/tests/testConnection.py 2010-09-22 20:54:07 UTC (rev 116733)
@@ -162,6 +162,13 @@
... conn.root()[i] = ZODB.tests.MinPO.MinPO(0)
>>> transaction.commit()
+ >>> import zope.testing.loggingsupport, logging
+ >>> handler = zope.testing.loggingsupport.InstalledHandler(
+ ... 'ZEO', level=logging.DEBUG)
+
+ >>> logging.getLogger('ZEO').debug(
+ ... 'Initial tid %s' % conn.root()._p_serial)
+
- disconnecting the first client (closing it with a persistent cache),
>>> db.close()
@@ -169,10 +176,6 @@
- starting a second client that writes objects more or less
constantly,
- >>> import zope.testing.loggingsupport, logging
- >>> handler = zope.testing.loggingsupport.InstalledHandler(
- ... 'ZEO', level=logging.DEBUG)
-
>>> import random, threading, time
>>> stop = False
>>> db2 = ZEO.DB(addr)
@@ -218,12 +221,13 @@
... print 'bad', c, i, conn.root()[i].value,
... print conn2.root()[i].value
... bad = True
+ ... print 'client debug log'
+ ... while handler.records:
+ ... record = handler.records.pop(0)
+ ... print record.name, record.levelname
+ ... print handler.format(record)
... if bad:
... print open('server-%s.log' % addr[1]).read()
- ... print 'client debug log', handler
- ... for record in handler.records:
- ... print record.name, record.levelname
- ... print handler.format(record)
... else:
... logging.getLogger('ZEO').debug('GOOD %s' % c)
... db.close()
More information about the Zodb-checkins
mailing list