[Zodb-checkins] SVN: ZODB/branches/jim-3.8-connection/src/ZEO/tests/invalidations_while_connecting.test Refined test to show more symptoms.

Jim Fulton jim at zope.com
Thu Jul 10 10:13:22 EDT 2008


Log message for revision 88192:
  Refined test to show more symptoms.
  

Changed:
  U   ZODB/branches/jim-3.8-connection/src/ZEO/tests/invalidations_while_connecting.test

-=-
Modified: ZODB/branches/jim-3.8-connection/src/ZEO/tests/invalidations_while_connecting.test
===================================================================
--- ZODB/branches/jim-3.8-connection/src/ZEO/tests/invalidations_while_connecting.test	2008-07-10 13:43:12 UTC (rev 88191)
+++ ZODB/branches/jim-3.8-connection/src/ZEO/tests/invalidations_while_connecting.test	2008-07-10 14:13:22 UTC (rev 88192)
@@ -53,37 +53,29 @@
     >>> thread.start()
 
 - restarting the first client, and 
+- testing for cache validity.
 
     >>> import zope.testing.loggingsupport, logging
     >>> handler = zope.testing.loggingsupport.InstalledHandler(
     ...    'ZEO', level=logging.ERROR)
 
     >>> import time
-    >>> for i in range(10):
+    >>> for c in range(10):
     ...    time.sleep(.1)
     ...    db = ZODB.DB(ZEO.ClientStorage.ClientStorage(addr, client='x'))
     ...    time.sleep(.1)
+    ...    conn = db.open()
+    ...    for i in range(1000):
+    ...        if conn.root()[i].value != conn2.root()[i].value:
+    ...            print 'bad', c, i, conn.root()[i].value,
+    ...            print  conn2.root()[i].value
     ...    db.close()
 
-    >>> time.sleep(.1)
-    >>> db = ZODB.DB(ZEO.ClientStorage.ClientStorage(addr, client='x'))
-
-
     >>> stop = True
     >>> thread.join(10)
     >>> thread.isAlive()
     False
 
-    >>> time.sleep(.1)
-
-- testing for cache validity.
-
-    >>> conn = db.open()
-    >>> for i in range(1000):
-    ...     if conn.root()[i].value != conn2.root()[i].value:
-    ...         print i, conn.root()[i].value, conn2.root()[i].value
-
-
     >>> for record in handler.records:
     ...     print record.name, record.levelname
     ...     print handler.format(record)



More information about the Zodb-checkins mailing list