[JAVA-2735] Test failed in LoggingCommandEventSenderSpecification Created: 16/Jan/18 Updated: 28/Oct/23 Resolved: 19/Jan/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Test Coverage |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Farès Hassak | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
Hello, I can't build master branch due to failed test in LoggingCommandEventSenderSpecification. should log events See attachment for more details. |
| Comments |
| Comment by Githook User [ 18/Jan/18 ] | |
|
Author: {'name': 'Farès Hassak', 'email': 'fares.hassak@gmail.com', 'username': 'fhassak'}Message: | |
| Comment by Farès Hassak [ 17/Jan/18 ] | |
|
Test is success when i force the locale within Gradle.
So, PR 441 is bad idea. i will close it. But what about runtime (locale depends on jvm) ? More about locale and jvm : http://www.oracle.com/technetwork/articles/javase/locale-140624.html#using Farès | |
| Comment by Charles Sarrazin (Inactive) [ 17/Jan/18 ] | |
|
What about forcing the locale within Gradle? Overall, this all depends on whether we want to force the log messages to be formatted in English, or whether we let users override locales. If we want to make sure that all log entries have the same format, then this should be enforced from within the code. Otherwise, we should not force the locale or string format in the code, but force the format in the gradle build options (forcing the user.language, user.country and user.variant properties). | |
| Comment by Farès Hassak [ 16/Jan/18 ] | |
| Comment by Farès Hassak [ 16/Jan/18 ] | |
|
2 possible solutions :
https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html like https://github.com/mongodb/mongo-java-driver/commit/cfc43dfaa7038a65ebb3ff88225b9d5ef50c30fe I will do a 2 PR for 2 solutions | |
| Comment by Farès Hassak [ 16/Jan/18 ] | |
|
Maybe It's because I have a different Local (French) : completed successfully in \\d+\\. completed successfully in 6,41 ms regex use '.' I think it's same issue as https://jira.mongodb.org/browse/JAVA-2625 | |
| Comment by Farès Hassak [ 16/Jan/18 ] | |
|
yes on windows, i need to investigate (with help of Charles...) | |
| Comment by Jeffrey Yemin [ 16/Jan/18 ] | |
|
I assume this is on Windows? Any hypothesis yet as to why the tests are failing? |