[Zope3-dev] ZODB test failure under Linux

Tim Peters tim@zope.com
Wed, 15 Jan 2003 14:00:17 -0500


[Marius Gedminas]
> I've been seeing this for the last couple of days:

The test is only a few days old, so that suggests it never worked for you.

> ======================================================================
> FAIL: testBucketSplitConflict
> (zodb.btrees.tests.test_conflict.NastyConfict)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
> "/home/users/mg/Zope3/src/zodb/btrees/tests/test_conflict.py",
> line 523, in testBucketSplitConflict
>     self.assertRaises(ConflictError, get_transaction().commit)
>   File "/usr/lib/python2.2/unittest.py", line 279, in failUnlessRaises
>     raise self.failureException, excName
> AssertionError: ConflictError
>
> ----------------------------------------------------------------------
> Ran 3365 tests in 442.461s
>
> FAILED (failures=1)

So it's asserting that ConflictError gets raised, but instead ConflictError
gets raised.  It must be a different ConflictError, then.  If you look at
the XXX comments right before the failing line, you'll see that there *is*
more than one flavor of ConflictError, and that it's already trying to use
the correct flavor.  It's A Bug that there's more than one flavor of
ConflictError, but the workaround should be working around that, and the
test passes for me.  I don't have an explanation for why it's failing for
you, assuming you're wholly up-to-date and (e.g.) don't have any stale .pyc
files sitting aound, *and* that you've rebuilt all the Zope3 C code recently
(there was a bug in Zope3 until recently that prevented ConflictError from
getting raised at all in this case -- the test that's failing for you was
added to ensure that this bug is really fixed now).