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

Build on Windows machine is broken #1551

Closed
amozhenin opened this issue Feb 4, 2019 · 2 comments · Fixed by #1552
Closed

Build on Windows machine is broken #1551

amozhenin opened this issue Feb 4, 2019 · 2 comments · Fixed by #1552

Comments

@amozhenin
Copy link
Contributor

When building cucumber on Windows machine, several tests are failing:

Environment
OS: Windows 10
System encoding: Cp1251
Cucumber version used: git master branch

  1. cucumber.runtime.UndefinedStepsTrackerTest.snippets_are_generated_for_correct_locale
    fails with

cucumber.runtime.CucumberException:
gherkin.ParserException$CompositeParserException: Parser errors:
(2:1): expected: #TagLine, #FeatureLine, #Comment, #Empty, got 'пїЅпїЅпїЅпїЅпїЅпїЅпїЅ:'
(3:3): expected: #TagLine, #FeatureLine, #Comment, #Empty, got 'пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ:'
(4:5): expected: #TagLine, #FeatureLine, #Comment, #Empty, got '* пїЅ'
(5:0): unexpected end of file, expected: #TagLine, #FeatureLine, #Comment, #Empty
at cucumber.runtime.UndefinedStepsTrackerTest.snippets_are_generated_for_correct_locale(UndefinedStepsTrackerTest.java:127)
Caused by: gherkin.ParserException$CompositeParserException:
Parser errors:
(2:1): expected: #TagLine, #FeatureLine, #Comment, #Empty, got 'пїЅпїЅпїЅпїЅпїЅпїЅпїЅ:'
(3:3): expected: #TagLine, #FeatureLine, #Comment, #Empty, got 'пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ:'
(4:5): expected: #TagLine, #FeatureLine, #Comment, #Empty, got '* пїЅ'
(5:0): unexpected end of file, expected: #TagLine, #FeatureLine, #Comment, #Empty
at cucumber.runtime.UndefinedStepsTrackerTest.snippets_are_generated_for_correct_locale(UndefinedStepsTrackerTest.java:127)

This is due to the bad encoding used to convert from String to InputStream in several methods.

  1. cucumber.runtime.java.weld.WeldFactoryTest.stopCalledWithoutStart
    fails with

java.lang.AssertionError:
Expected: is a string starting with "\nIf you have set enabled=false in org.jboss.weld.executor.properties and you are seeing\nthis message, it means your weld container didn't shut down properly. It's a Weld bug\nand we can't do much to fix it in Cucumber-JVM.\n\njava.lang.NullPointerException\n\tat cucumber.runtime.java.weld.WeldFactory.stop"
but: was "
If you have set enabled=false in org.jboss.weld.executor.properties and you are seeing
this message, it means your weld container didn't shut down properly. It's a Weld bug
and we can't do much to fix it in Cucumber-JVM.

java.lang.NullPointerException
at cucumber.runtime.java.weld.WeldFactory.stop(WeldFactory.java:50)

This test fails because Unix line endings are hardcoded in the test.

@mpkorstanje
Copy link
Contributor

Cheers! Much appreciated.

@lock
Copy link

lock bot commented Feb 9, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants