[Zope-Coders] Zope test results

Jeremy Hylton jeremy@zope.com
Mon, 10 Jun 2002 18:04:02 -0400


>>>>> "BG" == background  <background@shane.zope.com> writes:

  BG> ERROR: testAddNotification
  BG> (testTimeoutRelated.TestNotifications)
  BG> ----------------------------------------------------------------------
  BG> Traceback (most recent call last):
  BG>   File "testTimeoutRelated.py", line 70, in tearDown File
  BG>   "/home/background/zopetest/lib/python/ZODB/Transaction.py",
  BG>   line 111, in abort
  BG>     j.abort(o, self)
  BG>   File
  BG>   "/home/background/zopetest/lib/python/ZODB/Connection.py",
  BG>   line 227, in abort
  BG>     self._cache.invalidate(object._p_oid)
  BG> TypeError: len() of unsized object
  BG> ======================================================================
  BG> ERROR: testDelNotification
  BG> (testTimeoutRelated.TestNotifications)
  BG> ----------------------------------------------------------------------
  BG> Traceback (most recent call last):
  BG>   File "testTimeoutRelated.py", line 70, in tearDown File
  BG>   "/home/background/zopetest/lib/python/ZODB/Transaction.py",
  BG>   line 111, in abort
  BG>     j.abort(o, self)
  BG>   File
  BG>   "/home/background/zopetest/lib/python/ZODB/Connection.py",
  BG>   line 227, in abort
  BG>     self._cache.invalidate(object._p_oid)
  BG> TypeError: len() of unsized object
  BG> ----------------------------------------------------------------------
  BG> Ran 1456 tests in 298.544s

Someone caused these errors when he changed the cPickleCache so that
it doesn't accept None as an argument to invalidate().  It's clear
that something is wrong, but I'm not sure what the fix is.

It would be possible to add a test to abort() in Connection, so that
it didn't call invalidate if _p_oid is None.  If the object's oid is
None, then it isn't in the cache.  (It's also clear that the old
behavior of clearing the entire cache isn't intended.)  

How did an object with no oid get registered with this data manager?
I don't understand Transience product well enough to guess.  It's
possible that there is a bug that needs to be fixed there.

Jeremy