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

mvn test failed, charset problem #1549

Closed
xiby opened this issue Jun 15, 2020 · 2 comments · Fixed by #1550
Closed

mvn test failed, charset problem #1549

xiby opened this issue Jun 15, 2020 · 2 comments · Fixed by #1550
Labels
area/test Issue or PR related to test cases good first issue Good for newcomers

Comments

@xiby
Copy link
Contributor

xiby commented Jun 15, 2020

Issue Description

bug report

Describe what happened (or what feature you want)

when running

mvn test

to run all test cases in powershell of Windows 10, it failed when running cases in file com.alibaba.csp.sentinel.transport.command.http.HttpEventTaskTest.java, and here are some pictures about the failure:
image

Describe what you expected to happen

When run

mvn test

all test cases should success.

How to reproduce it (as minimally and precisely as possible)

  1. enter the root directory of Sentinel
  2. run command mvn test

Tell us your environment

os: Windows 10
maven version: 3.6.3

Anything else we need to know?

As the hint information indicates, maybe it should blame to the charset. After some search, I found that add

<argLine>-Dfile.encoding</argLine>

property in root pom.xml of plugin maven-surefire-plugin, as follow

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- CircleCI build workaround -->
                    <argLine>@{argLine} -Xms1024m -Xmx2048m</argLine>
                    <argLine>-Dfile.encoding</argLine>
                    <useSystemClassLoader>false</useSystemClassLoader>
                </configuration>
</plugin>

After added this, all test cases can be passed.

@sczyh30
Copy link
Member

sczyh30 commented Jun 15, 2020

We may add -Dfile.encoding=UTF-8 to JVM args of maven-surefire-plugin. Would you like to submit a PR to fix it?

@sczyh30 sczyh30 changed the title mvn test failed mvn test failed, charset problem Jun 15, 2020
@sczyh30 sczyh30 added area/test Issue or PR related to test cases good first issue Good for newcomers labels Jun 15, 2020
@xiby
Copy link
Contributor Author

xiby commented Jun 15, 2020

We may add -Dfile.encoding=UTF-8 to JVM args of maven-surefire-plugin. Would you like to submit a PR to fix it?

OK, I will fix it, and forget my typo :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test Issue or PR related to test cases good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants