Quantcast

failing Plone 4 tests

classic Classic list List threaded Threaded
5 messages Options
David Glick (GW) David Glick (GW)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

failing Plone 4 tests

 I have been looking into the failing Plone 4 tests that appeared about
a week ago, but am stumped. If I start with a coredev 4.0 checkout and
do the following:

$ svn up -r 39837 (the revision before it was updated to use Zope
2.12.11 -- so still on 2.12.10)
$ bin/develop reset
$ bin/buildout -Nv install test
$ bin/test -s Products.ATContentTypes -s
Products.ATReferenceBrowserWidget -s Products.CMFDynamicViewFTI

then the tests pass fine. But if I then switch to an svn checkout of
Zope2 from revision 114862 (the revision where 2.12.10 was tagged, so
should be the same Zope2 code as what I just had, right? I'm still
extending the 2.12.10 versions), and do:
$ bin/develop reset
$ bin/buildout -Nv install test
$ bin/test -s Products.ATContentTypes -s
Products.ATReferenceBrowserWidget -s Products.CMFDynamicViewFTI

Then the tests fail with:

Running Products.PloneTestCase.layer.PloneSite tests:
  Tear down Products.CMFTestCase.layer.CMFSite in 0.042 seconds.
  Tear down Products.CMFTestCase.layer.ZCML in 0.007 seconds.
  Set up Products.PloneTestCase.layer.ZCML in 0.001 seconds.
  Set up Products.PloneTestCase.layer.PloneSite Traceback (most recent
call last):
  File
"/Users/davidg/.buildout/eggs/zope.testing-3.9.4-py2.6.egg/zope/testing/testrunner/runner.py",
line 367, in run_layer
    setup_layer(options, layer, setup_layers)
  File
"/Users/davidg/.buildout/eggs/zope.testing-3.9.4-py2.6.egg/zope/testing/testrunner/runner.py",
line 632, in setup_layer
    layer.setUp()
  File
"/Users/davidg/Plone/p4/src/Products.PloneTestCase/Products/PloneTestCase/layer.py",
line 33, in setUp
    func(*args, **kw)
  File
"/Users/davidg/Plone/p4/src/Products.PloneTestCase/Products/PloneTestCase/setup.py",
line 169, in setupPloneSite
    base_profile, extension_profiles).run()
  File
"/Users/davidg/Plone/p4/src/Products.PloneTestCase/Products/PloneTestCase/setup.py",
line 209, in run
    self._setupPloneSite()
  File
"/Users/davidg/Plone/p4/src/Products.PloneTestCase/Products/PloneTestCase/setup.py",
line 232, in _setupPloneSite
    self._setupPloneSite_with_genericsetup()
  File
"/Users/davidg/Plone/p4/src/Products.PloneTestCase/Products/PloneTestCase/setup.py",
line 246, in _setupPloneSite_with_genericsetup
    addPloneSite(self.app, self.id, profile_id=self.base_profile)
  File "/Users/davidg/Plone/p4/src/Plone/Products/CMFPlone/factory.py",
line 80, in addPloneSite
    setup_tool.setBaselineContext('profile-%s' % profile_id)
  File
"/Users/davidg/.buildout/eggs/Products.GenericSetup-1.6.1-py2.6.egg/Products/GenericSetup/tool.py",
line 201, in setBaselineContext
    self.applyContextById(context_id, encoding)
  File
"/Users/davidg/.buildout/eggs/Products.GenericSetup-1.6.1-py2.6.egg/Products/GenericSetup/tool.py",
line 205, in applyContextById
    context = self._getImportContext(context_id)
  File
"/Users/davidg/.buildout/eggs/Products.GenericSetup-1.6.1-py2.6.egg/Products/GenericSetup/tool.py",
line 905, in _getImportContext
    info = _profile_registry.getProfileInfo(context_id)
  File
"/Users/davidg/.buildout/eggs/Products.GenericSetup-1.6.1-py2.6.egg/Products/GenericSetup/registry.py",
line 665, in getProfileInfo
    result = self._profile_info[ profile_id ]
KeyError: 'Products.CMFPlone:plone'

I have confirmed that the only difference in bin/test between these two
scenarios is:

107c107
<   '/Users/davidg/Plone/p4/src/Zope2/src',
---
>  
'/Users/davidg/.buildout/eggs/Zope2-2.12.10-py2.6-macosx-10.6-x86_64.egg',

So anyone have an explanation for what is causing the test to fail in
one case but not in the other?

David
----------
David Glick
 Web Developer
[hidden email]
206.286.1235x32

Groundwire: You Are Connected
 http://groundwire.org               

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Eric Steele (esteele) Eric Steele (esteele)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: failing Plone 4 tests

On Sep 17, 2010, at 3:14 AM, David Glick wrote:

> I have been looking into the failing Plone 4 tests that appeared about
> a week ago, but am stumped. If I start with a coredev 4.0 checkout and
> do the following:
>
> $ svn up -r 39837 (the revision before it was updated to use Zope
> 2.12.11 -- so still on 2.12.10)
> $ bin/develop reset
> $ bin/buildout -Nv install test
> $ bin/test -s Products.ATContentTypes -s
> Products.ATReferenceBrowserWidget -s Products.CMFDynamicViewFTI
>
> then the tests pass fine. But if I then switch to an svn checkout of
> Zope2 from revision 114862 (the revision where 2.12.10 was tagged, so
> should be the same Zope2 code as what I just had, right? I'm still
> extending the 2.12.10 versions), and do:
> $ bin/develop reset
> $ bin/buildout -Nv install test
> $ bin/test -s Products.ATContentTypes -s
> Products.ATReferenceBrowserWidget -s Products.CMFDynamicViewFTI
>
> Then the tests fail with:
>
> Running Products.PloneTestCase.layer.PloneSite tests:
>  Tear down Products.CMFTestCase.layer.CMFSite in 0.042 seconds.
>  Tear down Products.CMFTestCase.layer.ZCML in 0.007 seconds.
>  Set up Products.PloneTestCase.layer.ZCML in 0.001 seconds.
>  Set up Products.PloneTestCase.layer.PloneSite Traceback (most recent
> call last):
>  File
> "/Users/davidg/.buildout/eggs/zope.testing-3.9.4-py2.6.egg/zope/testing/testrunner/runner.py",
> line 367, in run_layer
>    setup_layer(options, layer, setup_layers)
>  File
> "/Users/davidg/.buildout/eggs/zope.testing-3.9.4-py2.6.egg/zope/testing/testrunner/runner.py",
> line 632, in setup_layer
>    layer.setUp()
>  File
> "/Users/davidg/Plone/p4/src/Products.PloneTestCase/Products/PloneTestCase/layer.py",
> line 33, in setUp
>    func(*args, **kw)
>  File
> "/Users/davidg/Plone/p4/src/Products.PloneTestCase/Products/PloneTestCase/setup.py",
> line 169, in setupPloneSite
>    base_profile, extension_profiles).run()
>  File
> "/Users/davidg/Plone/p4/src/Products.PloneTestCase/Products/PloneTestCase/setup.py",
> line 209, in run
>    self._setupPloneSite()
>  File
> "/Users/davidg/Plone/p4/src/Products.PloneTestCase/Products/PloneTestCase/setup.py",
> line 232, in _setupPloneSite
>    self._setupPloneSite_with_genericsetup()
>  File
> "/Users/davidg/Plone/p4/src/Products.PloneTestCase/Products/PloneTestCase/setup.py",
> line 246, in _setupPloneSite_with_genericsetup
>    addPloneSite(self.app, self.id, profile_id=self.base_profile)
>  File "/Users/davidg/Plone/p4/src/Plone/Products/CMFPlone/factory.py",
> line 80, in addPloneSite
>    setup_tool.setBaselineContext('profile-%s' % profile_id)
>  File
> "/Users/davidg/.buildout/eggs/Products.GenericSetup-1.6.1-py2.6.egg/Products/GenericSetup/tool.py",
> line 201, in setBaselineContext
>    self.applyContextById(context_id, encoding)
>  File
> "/Users/davidg/.buildout/eggs/Products.GenericSetup-1.6.1-py2.6.egg/Products/GenericSetup/tool.py",
> line 205, in applyContextById
>    context = self._getImportContext(context_id)
>  File
> "/Users/davidg/.buildout/eggs/Products.GenericSetup-1.6.1-py2.6.egg/Products/GenericSetup/tool.py",
> line 905, in _getImportContext
>    info = _profile_registry.getProfileInfo(context_id)
>  File
> "/Users/davidg/.buildout/eggs/Products.GenericSetup-1.6.1-py2.6.egg/Products/GenericSetup/registry.py",
> line 665, in getProfileInfo
>    result = self._profile_info[ profile_id ]
> KeyError: 'Products.CMFPlone:plone'
>
> I have confirmed that the only difference in bin/test between these two
> scenarios is:
>
> 107c107
> <   '/Users/davidg/Plone/p4/src/Zope2/src',
> ---
>>
> '/Users/davidg/.buildout/eggs/Zope2-2.12.10-py2.6-macosx-10.6-x86_64.egg',
>
> So anyone have an explanation for what is causing the test to fail in
> one case but not in the other?
>
> David


This feels really familiar. We ran into the same issue a few months back with a recent Zope release and decided to hold off on using it until we figured out what was causing the issue.

For the life of me, I can't find reference to it in my email or irc logs.

Eric
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
David Glick (GW) David Glick (GW)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: failing Plone 4 tests

In reply to this post by David Glick (GW)
 On 9/17/10 12:14 AM, David Glick wrote:
> KeyError: 'Products.CMFPlone:plone'
This is now resolved. The issue was a forward-compatibility import that
was added from Zope2.App.zcml to Products.Five.zcml, in conjunction with
a change in the ZCML layer teardown code of CMFTestCase and
PloneTestCase to try loading Zope2.App.zcml with a fallback to
Products.Five.zcml, and then set the _initialized flag to False in the
zcml module that was imported. The combination caused the _initialized
flag to be set in the wrong module.  I fixed this by updating both
CMFTestCase and PloneTestCase to try importing *both* modules and set
the _initialized flag in any that were successfully imported.
CMFTestCase and PloneTestCase need new releases.
David
----------
David Glick
 Web Developer
[hidden email]
206.286.1235x32

Groundwire: You Are Connected
 http://groundwire.org               

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alexander Limi Alexander Limi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: failing Plone 4 tests

On Sun, Sep 19, 2010 at 10:15 PM, David Glick <[hidden email]> wrote:
This is now resolved. The issue was a forward-compatibility import that
was added from Zope2.App.zcml to Products.Five.zcml, in conjunction with
a change in the ZCML layer teardown code of CMFTestCase and
PloneTestCase to try loading Zope2.App.zcml with a fallback to
Products.Five.zcml, and then set the _initialized flag to False in the
zcml module that was imported. The combination caused the _initialized
flag to be set in the wrong module.  I fixed this by updating both
CMFTestCase and PloneTestCase to try importing *both* modules and set
the _initialized flag in any that were successfully imported.

That was exactly what I was going to suggest!

;)

(Nice work tracking that one down)
 
--
Alexander Limi · http://twitter.com/limi · http://limi.net




------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alexander Limi · http://limi.net

David Glick (GW) David Glick (GW)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: failing Plone 4 tests

On 9/19/10 10:39 PM, Alexander Limi wrote:
On Sun, Sep 19, 2010 at 10:15 PM, David Glick <[hidden email]> wrote:
This is now resolved. The issue was a forward-compatibility import that
was added from Zope2.App.zcml to Products.Five.zcml, in conjunction with
a change in the ZCML layer teardown code of CMFTestCase and
PloneTestCase to try loading Zope2.App.zcml with a fallback to
Products.Five.zcml, and then set the _initialized flag to False in the
zcml module that was imported. The combination caused the _initialized
flag to be set in the wrong module.  I fixed this by updating both
CMFTestCase and PloneTestCase to try importing *both* modules and set
the _initialized flag in any that were successfully imported.

That was exactly what I was going to suggest!

;)

(Nice work tracking that one down)
A testbot running Plone coredev tests against the unreleased Zope 2.12 branch might help avoid this sort of thing in the future.  At least if anyone paid attention when testbots failed... :-/

David Glick
Web Developer
[hidden email]
206.286.1235x32

Groundwire logo

Sign up for Groundwire News! 



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Loading...