Commit 11f3f8c3 authored by Jim Fulton's avatar Jim Fulton

adjusted debugging info

parent bda8e796
...@@ -162,6 +162,13 @@ This tests tries to provoke this bug by: ...@@ -162,6 +162,13 @@ This tests tries to provoke this bug by:
... conn.root()[i] = ZODB.tests.MinPO.MinPO(0) ... conn.root()[i] = ZODB.tests.MinPO.MinPO(0)
>>> transaction.commit() >>> 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), - disconnecting the first client (closing it with a persistent cache),
>>> db.close() >>> db.close()
...@@ -169,10 +176,6 @@ This tests tries to provoke this bug by: ...@@ -169,10 +176,6 @@ This tests tries to provoke this bug by:
- starting a second client that writes objects more or less - starting a second client that writes objects more or less
constantly, constantly,
>>> import zope.testing.loggingsupport, logging
>>> handler = zope.testing.loggingsupport.InstalledHandler(
... 'ZEO', level=logging.DEBUG)
>>> import random, threading, time >>> import random, threading, time
>>> stop = False >>> stop = False
>>> db2 = ZEO.DB(addr) >>> db2 = ZEO.DB(addr)
...@@ -218,12 +221,13 @@ This tests tries to provoke this bug by: ...@@ -218,12 +221,13 @@ This tests tries to provoke this bug by:
... print 'bad', c, i, conn.root()[i].value, ... print 'bad', c, i, conn.root()[i].value,
... print conn2.root()[i].value ... print conn2.root()[i].value
... bad = True ... 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: ... if bad:
... print open('server-%s.log' % addr[1]).read() ... 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: ... else:
... logging.getLogger('ZEO').debug('GOOD %s' % c) ... logging.getLogger('ZEO').debug('GOOD %s' % c)
... db.close() ... db.close()
......
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