apache / apache/maven-surefire
[SUREFIRE-2104] user.language and user.region in systemPropertyVariables don't set default locale
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[Krzysztof Sobolewski](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER291424)** opened **[SUREFIRE-2104](https://issues.apache.org/jira/browse/SUREFIRE-2104?redirect=false)** and commented
Surefire provides a way to pass system properties to the JVM that runs tests within the systemPropertyVariables section. But it appears that these properties are not actually passed correctly and, for example, the default system locale is not set when user.language and user.region properties are specified this way. A workaround exists, which is to use:
`-Duser.language=en -Duser.region=GB`
instead, which should be exactly the same. In fact, when both are used, a warning is issued that one of these is redundant.
This is a "known" problem in the sense that it has its own Stack Overflow page: https://stackoverflow.com/questions/8901880/set-surefire-plugin-locale-in-maven-pom-file.
---
**Affects:** 3.0.0-M7
Contributor guide
Research direction
Start by reproducing the locale setup described for the systemPropertyVariables section, comparing it with the argLine workaround using user.language=en and user.region=GB. Verify how the test JVM receives both forms and confirm that systemPropertyVariables alone sets the default locale without the redundant-property warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100