-
Notifications
You must be signed in to change notification settings - Fork 342
Fix unittests & solr response error handling on python3 #162
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
Conversation
It would be great merging and releasing a new version, downstream a django-haystack PR is blocked because of this issue https://travis-ci.org/django-haystack/django-haystack/jobs/76260939 |
looks ok 👍 |
👍 |
# Test bad core as well | ||
self.solr.url = 'http://localhost:8983/solr/bad_core' | ||
self.assertRaises(SolrError, self.solr._send_request, 'get', 'select/?q=doc&wt=json') | ||
self.solr.url = old_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a try/finally block to avoid the possibility of an unanticipated error leaving the test self.solr.url
value in place
I've corrected my branch with the try/finally block 👍 |
* Resync test Solar script with django-haystack These are still not quite the same; at some point it would be nice to look into a common tool which both projects could use * Update Solr configuration script to set correct libpath for solr-cell to avoid lazy-load failures during testing as was reported on e.g. django-haystack#162
The Solr errors turned out be caused by a change in file paths between Solr releases – the path in |
After that change, the only commits left on this PR were squashed into acdha@cf0fa49 which ran successfully: |
cool 👍 The only remaining trouble is the travis status button on the README which points on a non existing target (https://travis-ci.org/toastdriven/pysolr) |
Yes – unfortunately, only @toastdriven can check the box to enable that CI build. I'd prefer to transfer this repo to the django-haystack organization so it doesn't depend a single person. |
Previously the error handling did not work correctly on Python 3 because a byte-string response wasn't decoded before processing. Thanks to Emmanuel Leblond (@touilleMan) for the patch.
Hi there !
Following issue #159, I went working a bit on this project
test_extract
given it was weirdly failing under travisHere is the stack trace of the error (or see https://travis-ci.org/touilleMan/pysolr/jobs/71444801, the error is present both on python 2.x and 3.x)
My guess is travis is missing a library, but I couldn't figure really what...