[Zope3-dev] functional tests need an ObjectHub

Garrett Smith garrett@mojave-corp.com
Fri, 1 Aug 2003 11:07:15 -0500


Marius Gedminas wrote:
> On Fri, Aug 01, 2003 at 05:14:54PM +1000, Anthony Baxter wrote:
>> Trying to use ObjectHub in functional tests right now is busted.
>> There's no 'HubIds' service hooked up (and I suspect no Registration
>> service, either). Can someone (SteveA nominated Marius :) please
>> have a look at this and fix?
>=20
> I put a breakpoint in BootstrapInstance.doSetup, and saw that both
> HubIds service and Registration component are created before running
> the functional tests.
>=20
> Do you manipulate objects directly (via getRootFolder()['xxx']) or via
> the publication mechanism?  In the former case it might be that the
> lack of context decoration stopped any events being sent to the hub
> service.=20
>=20
> I have modified FunctionalTestCase.getRootFolder to return context
> wrapped root folder now.  Could you check if you still have problems?
> If so, I'd like to see the actual test code that fails.

<hand_wave>
Recent change causes functional tests to hang, e.g.:

    def testHang(self):
        self.getRootFolder()  # 1
        self.getRootFolder()  # 2
        self.getRootFolder()  # 3
        self.getRootFolder()  # 4
        self.getRootFolder()  # 5
        self.getRootFolder()  # 6
        self.getRootFolder()  # 7
        self.publish('/')

</hand_wave>

I would, at least, have expected a warning message, "getRootFolder()
quota exceeded". Please see my earlier post for more info on this
problem.

 -- Garrett