[Zodb-checkins] CVS: ZODB3/ZEO/tests - InvalidationTests.py:1.1.4.10
Tim Peters
tim.one at comcast.net
Sat Aug 23 21:06:46 EDT 2003
Update of /cvs-repository/ZODB3/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv13475/ZEO/tests
Modified Files:
Tag: ZODB3-3_1-branch
InvalidationTests.py
Log Message:
checkConcurrentLargeUpdates(): Display much more information when this
test fails (as if often does for me on Windows, when Berkeley is the
underlying storage -- some thread doesn't manage to add any keys).
=== ZODB3/ZEO/tests/InvalidationTests.py 1.1.4.9 => 1.1.4.10 ===
--- ZODB3/ZEO/tests/InvalidationTests.py:1.1.4.9 Sat Aug 23 18:59:56 2003
+++ ZODB3/ZEO/tests/InvalidationTests.py Sat Aug 23 20:06:45 2003
@@ -411,13 +411,26 @@
# check the threads differently here than in the other tests
L = [None, t1, t2, t3]
+ errormsgs = []
+ err = errormsgs.append
for t in t1, t2, t3:
- self.assert_(t.added_keys)
+ if not t.added_keys:
+ err("thread %d didn't add any keys" % t.threadnum)
for k in t.added_keys:
- self.assert_(tree[k] != 0)
- if tree[k] != t.threadnum:
- self.assert_(k in L[tree[k]].added_keys)
+ if not tree.has_key(k):
+ err("%d in thread %d's added_keys, but %d not in "
+ "tree" % (k, t.threadnum, k))
+ elif tree[k] == 0:
+ err("%d in thread %d's added_keys, but tree[%d]==0" %
+ (k, t.threadnum, k))
+ for k, tnum in tree.items():
+ if tnum > 0 and k not in L[tnum].added_keys:
+ err("tree believes %d was added by thread %d, but %d isn't "
+ "in thread %d's added_keys" % (k, tnum, k, tnum))
+ if errormsgs:
+ display(tree)
+ self.fail('\n'.join(errormsgs))
cn.close()
db1.close()
More information about the Zodb-checkins
mailing list