collective / collective.solr

Solr search engine integration for Plone
https://pypi.org/project/collective.solr/
22 stars 46 forks source link

Get rid of activateAndReindex method in testing.py #63

Open tisto opened 9 years ago

tisto commented 9 years ago

https://github.com/collective/collective.solr/blob/master/src/collective/solr/testing.py#L171

Almost all tests in c.solr require Solr activated in the control panel. Therefore the activation should happen in the test setup, to simplify things. We can specifically deactivate Solr in a test if we need to.

I guess this method is just legacy code from the pre-plone.app.testing era. We could first rename the method to just "reindex" and then either keep it, or automatically reindex on test setup/teardown.

@do3cc @witsch opinions?

do3cc commented 9 years ago

I don't know if it might be faster to do solr activation and reindex after the site has been created Apart from that I don't mind

do3cc commented 9 years ago

I have a similar question. It seems that indexing does not work if my own test layer does not install the collective.indexing product. If this is as expected, should this not be part of the solr.testing layer?