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

Test updates #467

Merged
merged 5 commits into from
Jan 25, 2017
Merged

Test updates #467

merged 5 commits into from
Jan 25, 2017

Conversation

mmulich
Copy link
Contributor

@mmulich mmulich commented Jan 25, 2017

This is a set of changes to bring the tests up-to-date (now using pyramid>=1.8).

I've made a small executive decision to skip the entity expansion test altogether. The DTD files are no longer available at the defined url. We've fixed this several times over the past few years and it just keeps popping up. For the most part this is no longer relevant since we've converted cnxml 0.5 to cnxml 0.7 in production. Furthermore, production machines are natively loaded with the DTD files. Also, if we for some reason legitimately run into this on production, it would fail fast and loud during an operation that is not user facing.

I've added one feature to skip tests that require memcached when memcached is not running. This is particularly useful for those that aren't testing that part of the system. A warning message is posted on test run; so it's not a silent operation.

This test would pass on a system that has the DTD files installed,
but most developers don't have that. Rather than having the developer
chase her/his tail, just skip it. Besides, the conversion from 0.5 to 0.7
took place over 2yrs ago.
This could be a difference between PostgreSQL 9.4 and 9.6.
PostgreSQL >=9.5 prints out the location where the error occured.
These changes check for the specific message and ignore the details around it.
The tests were failing due to webob and pyramid>=1.8 allowing @ and : as
safe elements in a url. This should be backwards compatible as well.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 94.536% when pulling e8e14b9 on test-updates into 57d0378 on master.

Copy link
Contributor

@reedstrm reedstrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the encoding cleanup. Not completely sure about the memcached change, what's it's purpose? Just to get a faster test run? Since we still test w/ it on travis, I guess no harm no foul, but wondering why. An alternative would be to mock it.

Copy link
Contributor

@reedstrm reedstrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regardless of the memcached thing (the runtime warning is quickly buried by the results when run via setup.py, BTW - skipped jumps up to 7 though (from a normal of 2 - would be nice to get the normal to 0)

@reedstrm reedstrm merged commit 46f702f into master Jan 25, 2017
@reedstrm reedstrm deleted the test-updates branch January 25, 2017 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants