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

Clear libxml errors before using them #14

Merged
merged 3 commits into from Aug 2, 2018
Merged

Clear libxml errors before using them #14

merged 3 commits into from Aug 2, 2018

Conversation

@WMDE-Fisch
Copy link
Contributor

WMDE-Fisch commented Jul 17, 2018

In the FileImporter project I got failing hamcrest test due to totally
unrelated leftover libxml errors form other parts of the code. Clearing the
errors before listening and depending on them could be a solution to that.

Although this would not be needed if errors are cleared correctly in other code
places, it was really a pain to debug this.

See
https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/FileImporter/+/442895/14
https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-hhvm-docker/7215/console
https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/FileImporter/+/445430/

In the FileImporter project I got failing hamcrest test due to totally
unrelated leftover libxml errors form other parts of the code. Clearing the
errors before listening and depending on them could be a solution to that.

Although this would not be needed if errors are cleared correctly in other code
places, it was really a pain to debug this.

See
https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/FileImporter/+/442895/14
https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-hhvm-docker/7215/console
https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/FileImporter/+/445430/
@WMDE-Fisch WMDE-Fisch requested review from addshore, thiemowmde and bekh6ex Jul 17, 2018
Copy link
Contributor

bekh6ex left a comment

Is it possible to reproduce it in tests?
If so, we need a test!

This test will trigger libxml errors from parsing a broken DOM that
then are left unhandled to see it the hamcrest assertion will be
influenced by that.
@WMDE-Fisch

This comment has been minimized.

Copy link
Contributor Author

WMDE-Fisch commented Jul 19, 2018

Is it possible to reproduce it in tests?
If so, we need a test!

Good point, test added :-)!

@addshore addshore merged commit bfe0de9 into master Aug 2, 2018
3 checks passed
3 checks passed
Scrutinizer Analysis: No new issues – Tests: passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@thiemowmde thiemowmde deleted the clear-xml-errors branch Aug 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.