please help me with running phpunit tests that check module with sphinx search engine.
To search in that module I use two sphinx indexes docs
and docsdelta
. After new data are appear in the DB, I do following:
exec("indexer docsdelta --rotate");
exec("indexer --merge docs docsdelta --rotate");
It works well on my website and I am able to add new document through the web interface and it appears in the search.
On the same time when I run phpunit test and it creates new document "on fly",
exec("indexer docsdelta --rotate");
does not fetch any new data. My phpunit tests use transactions to rollback the database to the previous state and I notice, that indexer works properly in case if I switch off transactions. Additionally I am able to see new data in the DB, just before and after running indexer
. Maybe I missed something but I do not understand why transaction has an influence on indexer.
Is it some way to use indexer docdelta
together with MySQL transaction?
Thank you in advance for help!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire