Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing plone.app.event break test runner #81

Closed
tdesvenain opened this issue Jul 18, 2013 · 9 comments
Closed

Installing plone.app.event break test runner #81

tdesvenain opened this issue Jul 18, 2013 · 9 comments

Comments

@tdesvenain
Copy link
Member

Probably because of an incompatibility between ZODB 3.10 and 'persistent' dependency
when we remove persistent from bin/test script, we don't have this traceback

File "/home/thomasdesvenain/.buildout/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 366, in run_layer
setup_layer(options, layer, setup_layers)
File "/home/thomasdesvenain/.buildout/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 628, in setup_layer
setup_layer(options, base, setup_layers)
File "/home/thomasdesvenain/.buildout/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 628, in setup_layer
setup_layer(options, base, setup_layers)
File "/home/thomasdesvenain/.buildout/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 628, in setup_layer
setup_layer(options, base, setup_layers)
File "/home/thomasdesvenain/.buildout/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 633, in setup_layer
layer.setUp()
File "/home/thomasdesvenain/.buildout/eggs/plone.testing-4.0.8-py2.7.egg/plone/testing/z2.py", line 300, in setUp
self.setUpApp()
File "/home/thomasdesvenain/.buildout/eggs/plone.testing-4.0.8-py2.7.egg/plone/testing/z2.py", line 555, in setUpApp
Zope2.startup()
File "/home/thomasdesvenain/.buildout/eggs/Zope2-2.13.21-py2.7.egg/Zope2/init.py", line 47, in startup
_startup()
File "/home/thomasdesvenain/.buildout/eggs/Zope2-2.13.21-py2.7.egg/Zope2/App/startup.py", line 123, in startup
DB, 'Application', OFS.Application.Application, ()
File "/home/thomasdesvenain/.buildout/eggs/Zope2-2.13.21-py2.7.egg/App/ZApplication.py", line 31, in init
if not root.has_key(name):
File "/home/thomasdesvenain/.buildout/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/Connection.py", line 860, in setstate
self._setstate(obj)
File "/home/thomasdesvenain/.buildout/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/Connection.py", line 915, in _setstate
obj._p_serial = serial
ValueError: _p_serial must be an 8-character bytes array

@thet
Copy link
Member

thet commented Jul 18, 2013

thanks for the bug report!
i already fixed it in: 3c637d5
i'll make a new release soon.

@thet thet closed this as completed Jul 18, 2013
@tdesvenain
Copy link
Member Author

Great !
I also try to manually remove 'persistent' from bin/test script. but there, i got an other error : can't find DateRecurringIndex. I'm not sure this is a bug, maybe I missed something ?

@thet
Copy link
Member

thet commented Jul 19, 2013

hm...
do you have plone.app.testing in version 4.2.2?
do you get this error with a fresh checkout of plone.app.event and running for example the dev.cfg buildout configuration?
if so, this sounds like another plone.app.testing issue.

@tdesvenain
Copy link
Member Author

I just retried with the new release. First problem is fixed but second remains.

I have imported plone.app.event in a project buildout and added it to dependencies of my packages, i get this traceback when running tests :

Traceback (most recent call last):
File "/home/formation/mpi.si/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 366, in run_layer
setup_layer(options, layer, setup_layers)
File "/home/formation/mpi.si/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 628, in setup_layer
setup_layer(options, base, setup_layers)
File "/home/formation/mpi.si/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 633, in setup_layer
layer.setUp()
File "/home/formation/mpi.si/eggs/plone.app.testing-4.2.2-py2.7.egg/plone/app/testing/helpers.py", line 343, in setUp
self.setUpPloneSite(portal)
File "/home/formation/mpi.si/src/mpi/si/testing.py", line 33, in setUpPloneSite
super(MPISILayer, self).setUpPloneSite(portal)
File "/home/formation/mpi.si/eggs/plone.app.testing-4.2.2-py2.7.egg/plone/app/testing/helpers.py", line 454, in setUpPloneSite
self.applyProfiles(portal)
File "/home/formation/mpi.si/eggs/plone.app.testing-4.2.2-py2.7.egg/plone/app/testing/helpers.py", line 462, in applyProfiles
self.applyProfile(portal, self.gs_profile_id)
File "/home/formation/mpi.si/eggs/plone.app.testing-4.2.2-py2.7.egg/plone/app/testing/helpers.py", line 389, in applyProfile
return applyProfile(portal, profileName)
File "/home/formation/mpi.si/eggs/plone.app.testing-4.2.2-py2.7.egg/plone/app/testing/helpers.py", line 113, in applyProfile
setupTool.runAllImportStepsFromProfile(profileId)
File "/home/formation/mpi.si/eggs/Products.GenericSetup-1.7.4-py2.7.egg/Products/GenericSetup/tool.py", line 350, in runAllImportStepsFromProfile
ignore_dependencies=ignore_dependencies)

  • traceback_info: profile-mpi.si:default
    File "/home/formation/mpi.si/eggs/Products.GenericSetup-1.7.4-py2.7.egg/Products/GenericSetup/tool.py", line 1100, in _runImportStepsFromContext
    message = self._doRunImportStep(step, context)
    File "/home/formation/mpi.si/eggs/Products.GenericSetup-1.7.4-py2.7.egg/Products/GenericSetup/tool.py", line 1015, in _doRunImportStep
    return handler(context)
  • traceback_info: plone.app.event-catalog
    File "/home/formation/mpi.si/eggs/plone.app.event-1.0rc2-py2.7.egg/plone/app/event/setuphandlers.py", line 64, in catalog_setup
    catalog.addIndex(name, 'DateRecurringIndex', extra=extra())
    File "/home/formation/mpi.si/eggs/Products.ZCatalog-2.13.23-py2.7.egg/Products/ZCatalog/ZCatalog.py", line 853, in addIndex
    raise ValueError("Index of type %s not found" % type)
    ValueError: Index of type DateRecurringIndex not found

@tdesvenain tdesvenain reopened this Jul 22, 2013
@thet
Copy link
Member

thet commented Aug 28, 2013

now, davisagli and i made some more significant changes to the test setup. the tests are running with plone.app.event's test-42.cfg, test-43.cfg and buildout.coredev's plips/plip10886-event-improvements.cfg on Plone 5.

please check again, and reopen if it still fails. if so, please include a minimal buildout.cfg to reproduce the problem.

@thet thet closed this as completed Aug 28, 2013
@gyst
Copy link
Member

gyst commented Sep 6, 2013

@tdesvenain I fixed the same issue in a customer project by noting that the p.a.event test fixtures extend the Products.DateRecurringIndex text fixtures.

Installing Products.DateRecurringIndex in my test setup fixed this for me.

def setUpZope(self, app, configurationContext):
    # normal setup here

    # Install products that use an old-style initialize() function
    z2.installProduct(app, 'Products.DateRecurringIndex')

def tearDownZope(self, app):
    # Uninstall products installed above
    z2.uninstallProduct(app, 'Products.DateRecurringIndex')

@tdesvenain
Copy link
Member Author

Great, Thank you guido

On Fri, Sep 6, 2013 at 12:20 PM, Guido Stevens notifications@github.comwrote:

@tdesvenain https://github.com/tdesvenain I fixed the same issue in a
customer project by noting that the p.a.event test fixtures extend the
Products.DateRecurringIndex text fixtures.

Installing Products.DateRecurringIndex in my test setup fixed this for me.

def setUpZope(self, app, configurationContext):
# normal setup here

# Install products that use an old-style initialize() function
z2.installProduct(app, 'Products.DateRecurringIndex')

def tearDownZope(self, app):
# Uninstall products installed above
z2.uninstallProduct(app, 'Products.DateRecurringIndex')


Reply to this email directly or view it on GitHubhttps://github.com//issues/81#issuecomment-23930996
.

Thomas Desvenain

Téléphone : 09 51 37 35 18

@thet
Copy link
Member

thet commented Sep 6, 2013

oh yes, the plone.app.event test layers extend the DateRecurringIndex test fixture.
hm.
should we rather install DRI explicit in plone.app.event's test layers?

@gyst
Copy link
Member

gyst commented Sep 7, 2013

I think so. Explicit over implicit. All the inherited layer does is DRI install/uninstall.

Guido Stevens | +31.43.3618933 | http://cosent.nl

s o c i a l k n o w l e d g e t e c h n o l o g y

On 6 sep. 2013, at 23:00, Johannes Raggam notifications@github.com wrote:

oh yes, the plone.app.event test layers extend the DateRecurringIndex test fixture.
hm.
should we rather install DRI explicit in plone.app.event's test layers?


Reply to this email directly or view it on GitHub.

@thet thet reopened this Sep 9, 2013
@thet thet closed this as completed in 2e87d1f Sep 9, 2013
idgserpro added a commit to plonegovbr/brasil.gov.portal that referenced this issue Jul 7, 2017
hvelarde pushed a commit to plonegovbr/brasil.gov.portal that referenced this issue Jul 7, 2017
* plone.app.contenttypes para versão Plone (1.1.1)

Iniciando a troca de nomes das views como definido em

https://github.com/plone/plone.app.contenttypes/blob/1.1.1/plone/app/contenttypes/upgrades.py#L134

* Adiciona campo ateendees para o obj evento-1.

Evita o erro

plone.app.contenttypes-1.1.1-py2.7.egg/plone/app/contenttypes/migration/dxmigration.py", line 74, in migrate_schema_fields
    self.new.attendees = tuple(self.old.attendees.splitlines())
AttributeError: 'NoneType' object has no attribute 'splitlines'

ao rodar o upgradeStep. No caso, isso só é util se o usuário voltar a
rodar esse upgradeStep, pois para usuários que criam sites novos a
partir desse commit não terão esse problema.

* Pina plone.app.contenttypes.

Queremos evitar de pinar numa branch de portal.buildout para que no
futuro, caso seja necessário remontar esse ambiente com esse commit, não
dê erro na branch que terá sido excluída.

* Adiciona upgradeStep.

* Patch em migrate_schema_fields

Ao atualizar para plone.app.contenttypes 1.1.1, se você tiver um evento
criado pelo brasil.gov.portal sem attendees ou ter eventos criados pela
interface sem preencher o campo atteendes, dá erro na migração. Por isso
precisamos do patch.

* Melhora a documentação do migrate_schema_fields

* Adiciona Products.DateRecurringIndex no teste.

plone/plone.app.event#81 (comment)

* Adapta o nome das views para o padrão 1.1.1.

Com a atualização para o plone.app.contenttypes, houve mudança no nome
das views e foi necessária a sua adaptação, tanto nas templates quanto
na lógica dos overrides.zcml.

https://github.com/plone/plone.app.contenttypes/tree/1.1.1#user-content-differences-to-productsatcontenttypes

folder_listing_view (Folders) and collection_view (Collections) -> listing_view (Folders and Collections)
folder_summary_view (Folders) and summary_view (Collections) -> summary_view (Folders and Collections)
folder_tabular_view (Folders) and tabular_view (Collections) -> tabular_view (Folders and Collections)
folder_full_view (Folders) and all_content (Collections) -> full_view (Folders and Collections)
atct_album_view (Folders) and thumbnail_view (Collections) -> album_view (Folders and Collections)

* Coloca a url da branch.

Coloca a url da branch para poder passar no travis.

* Permite que os testes test_collection_summary_view e
test_collection_listing_view falhem.

test_collection_listing_view e test_collection_summary_view estão
falhando após plone.app.contenttypes >= 1.1.1

Ver: #359
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants