-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix incompatible encodings error in Junit formatter #1244
Conversation
I am not sure how to make both |
22589c8
to
f14503b
Compare
@NickAb Rebase on the latest commit on master and change |
f14503b
to
1a7612b
Compare
@brasmusson thank you. All done |
Lets add a deprecation warning for |
Hi @NickAb, Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾 In return for this generous offer we hope you will:
On behalf of the Cucumber core team, |
The fix does not work on JRuby, see https://circleci.com/gh/cucumber/cucumber-ruby/849, and also #1259. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Fix incompatible character encodings error in Junit formatter which occurs if strings with incompatible encodings were written to pipe.
Details
Replaced array buffer in Interceptor::Pipe with StringIO to prevent incompatible character encodings error. This also elements need to join array in Junit formatter and reduces exposure of internals of pipe interceptor. Although #buffer method was kept and is backward compatible in case any end user code is using it.
Motivation and Context
This fixes issues of cucumber failing to generate junit report for test cases that had non UTF strings in different languages logged during test run.
How Has This Been Tested?
Add test case for junit formatter to write output in case of incompatible strings being logged during test run.
Screenshots (if appropriate):
Types of changes
Checklist: