Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Test suits encoding problems #32

Closed
scalder27 opened this issue Sep 8, 2015 · 5 comments
Closed

Test suits encoding problems #32

scalder27 opened this issue Sep 8, 2015 · 5 comments

Comments

@scalder27
Copy link

Hello, I`ve encountered a teamcity reporter output issue with russian symbols in the test suits.
This issue can be reproduced by adding next test (karma-teamcity-reporter\examples\simple\index.spec.js):

it('это тоже должно работать', function () {
    1 + 1 === 2
})

And there is a screenshot from the teamcity:
image

@thojo
Copy link

thojo commented Oct 23, 2015

+1

I have the same problem with german umlauts. When not using the teamcity reporter umlauts are correctly displayed in build logs.

dizel3d referenced this issue Mar 16, 2016
This ensures thad all tests are reported before
the process ends.

Closes #5
@dizel3d
Copy link
Contributor

dizel3d commented Mar 17, 2016

The bug is produced by fix d8d9e70 (issue #5): Windows OS console use ANSI and fs.writeSync cannot print language-specific symbols correctly.

Issue #5 occurred because process.stdout.write was non-blocking in node up to v0.11.11. But since node v0.11.12 (2014.03.11) it is blocking. See nodejs v0.11.12 (2014.03.11) changelog: windows: make stdout/sterr pipes blocking (Alexis Campailla). I checked this, and you can check this too.

Also AppVeyor notifies about issue #5 in old Node.js versions: Garbled or missing output.

I think we can revert d8d9e70 to fix the bug and reopen issue #5 with "it is known issue with nodejs < v0.11.12 on Windows ...".

dizel3d added a commit to ITGlobal/karma-teamcity-reporter that referenced this issue Mar 25, 2016
Reverted d8d9e70.
fs.writeSync is used as workaround for node < v0.11.12 to fix the bug karma-runner#5. But now it is not needed.

Closes karma-runner#32
dizel3d added a commit to ITGlobal/karma-teamcity-reporter that referenced this issue Mar 25, 2016
Reverted d8d9e70.
fs.writeSync is used as workaround for node < v0.11.12 to fix the bug karma-runner#5. But now it is not needed.

Closes karma-runner#32
@dizel3d
Copy link
Contributor

dizel3d commented Mar 25, 2016

I am sorry, I was wrong in previous comment. It does not fix the bug, it just fixes encoding in console. I thought that TeamCity emulates TTY.

dizel3d added a commit to ITGlobal/karma-teamcity-reporter that referenced this issue Mar 26, 2016
Reverted d8d9e70.
fs.writeSync is used as workaround for node < v0.11.12 to fix the bug karma-runner#5. But now it is not needed.

Closes karma-runner#32
@dizel3d
Copy link
Contributor

dizel3d commented Mar 28, 2016

Ok, guys, take the solution! You should add configuration parameter teamcity.runner.commandline.stdstreams.encoding with value UTF8.
image
Thanks to the topics:
http://stackoverflow.com/questions/9213241/teamcity-build-log/29716411#29716411
https://youtrack.jetbrains.com/issue/TW-4177#comment=27-1038539

@scalder27
Copy link
Author

@dizel3d, it's unbelievable! You did an amazing investigation! Thank you very much!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants