Skip to content

Jdbc*DaoTest fail under Windows #1164

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

Closed
php-coder opened this issue Dec 10, 2019 · 3 comments
Closed

Jdbc*DaoTest fail under Windows #1164

php-coder opened this issue Dec 10, 2019 · 3 comments
Assignees
Labels
ADR/needed A decision has been made and it needs to be documented area/unit tests kind/bug kind/regression
Milestone

Comments

@php-coder
Copy link
Owner

php-coder commented Dec 10, 2019

[ERROR]   JdbcCategoryDaoTest.getStatisticsOfInRussian:135
Expecting:
 <{"Фауна"=5}>
to contain key:
 <"?????">

and

[ERROR]   JdbcCountryDaoTest.getStatisticsOfInRussian:225
Expecting:
 <{"Итали▒?"=5}>
to contain key:
 <"??????">

Regression after 9683990 and 7de0591 commits.

@php-coder
Copy link
Owner Author

@php-coder php-coder modified the milestones: 0.4.3, 0.4.2 Dec 11, 2019
@php-coder
Copy link
Owner Author

It works with the following patch:

--- pom.xml
+++ pom.xml
@@ -916,6 +916,7 @@
                                <configuration>
                                        <skipTests>${skipUnitTests}</skipTests>
                                        <disableXmlReport>${disableXmlReport}</disableXmlReport>
+                                       <argLine>@{argLine} -Dfile.encoding=${project.build.sourceEncoding}</argLine>
                                </configuration>
                        </plugin>

It seems like surefire-maven-plugin ignores ${project.build.sourceEncoding} property while it should use it.

@php-coder
Copy link
Owner Author

When mvn -X is running and the patch isn'a applied:

[DEBUG] Forking command line: /bin/sh -c cd /Users/coder/git/mystamps && /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/bin/java -Xss256k -jar /Users/coder/git/mystamps/target/surefire/surefirebooter4031739785717758632.jar /Users/coder/git/mystamps/target/surefire 2019-12-18T21-13-10_015-jvmRun1 surefire7125194376192956497tmp surefire_02008697226629000339tmp

and when we explicitly specify this option:

[DEBUG] Forking command line: /bin/sh -c cd /Users/coder/git/mystamps && /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/bin/java -Xss256k -Dfile.encoding=UTF-8 -jar /Users/coder/git/mystamps/target/surefire/surefirebooter267664868437770488.jar /Users/coder/git/mystamps/target/surefire 2019-12-18T21-15-17_599-jvmRun1 surefire3540607098640203181tmp surefire_07841473511979566900tmp

php-coder added a commit that referenced this issue Jan 22, 2020
Prior this commit it didn't work with the following message:
[INFO] Skipping JaCoCo execution due to missing execution data file.

Regression after aa43861 (#1164)

Fix #1239

[skip ci]
@php-coder php-coder added the ADR/needed A decision has been made and it needs to be documented label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADR/needed A decision has been made and it needs to be documented area/unit tests kind/bug kind/regression
Projects
None yet
Development

No branches or pull requests

1 participant