Hanno Schlichting wrote:
>>> - real world testing
> My testing of Plone 3.0 after the merge so far results in all
> integration tests failing with that stupid error inside the component
> registry when it throws an AttributeError on 'adapters'. The error
> happened a few times already, but I'm too tired to figure out right now
> why it is failing this time.
I looked a bit deeper into this and still cannot figure out what exactly
is going wrong.
Starting any Plone tests will give an AttributeError on self.adapters in
the subscribers method of zope.component.registry.
The registry is actually the one from five.lsm and is found via the
zope.app.component.hooks.SiteInfo container. In there it is available as
the sm property, but it indeed at that point lacks the adapters
attribute. It looks like _init_registries is never called. But when I
overwrite the set method on SiteInfo every time a new sm is set, it has
the right adapters.
Now the event that is fired is the EndRequestEvent during the late steps
of PloneTestCase's SiteSetup. What I suspect is that the five.lsm is
already partially removed at the point the event is fired and thus does
not have an adapters argument anymore. But my knowledge of the actual
inner workings of the ZODB transaction machinery is very limited.
The code in PloneTestCase.setup.SiteSetup looks like this:
self.app = self._app()
[... does the setup ...]
The event is fired during self._close() and self._abort essentially does
I didn't have time to test this properly but maybe this gives somebody
else an idea who wants to look at it...
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests