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

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/
Copy link
Contributor

@bekh6ex bekh6ex left a comment

Choose a reason for hiding this comment

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

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
Copy link
Contributor Author

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
@thiemowmde thiemowmde deleted the clear-xml-errors branch August 4, 2018 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants