-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[MNG-8454] Force the FileSizeFormat UT to US Locale #2003
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
Conversation
As it uses now String.format that produces different decimal separator based on local, most notable DE --- https://issues.apache.org/jira/browse/MNG-8454
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertThrows; | ||
|
||
class FileSizeFormatTest { | ||
// Locale like DE uses "," and not "." | ||
// For simplicity’s sake let test in US | ||
static Locale original; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to use https://junit-pioneer.org/docs/default-locale-timezone/ for this (and yes I'm a maintainer of this project, together with Nicolai Parlog and others)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created https://issues.apache.org/jira/browse/MNG-8459 to follow up, right now am interested in fixing this single failure only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works with the fix also in German
[INFO] Maven 4 Core ......................................................................................... SUCCESS [ 31.458 s]
[INFO] Maven 4 CLI .......................................................................................... SUCCESS [ 8.805 s]
[INFO] Maven Embedder (deprecated) .......................................................................... SUCCESS [ 6.153 s]
[INFO] Maven Artifact Resolver Provider (deprecated) ........................................................ SUCCESS [ 4.854 s]
[INFO] Maven Compat (deprecated) ............................................................................ SUCCESS [ 14.260 s]
[INFO] Apache Maven Distribution ............................................................................ SUCCESS [ 5.425 s]
[INFO] Maven 4 Executor ..................................................................................... SUCCESS [ 52.184 s]
[INFO] Maven 4 Implementation Modules ....................................................................... SUCCESS [ 0.100 s]
[INFO] Maven Compatibility Modules .......................................................................... SUCCESS [ 0.086 s]
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time: 03:01 min
[INFO] Finished at: 2024-12-20T12:20:47+01:00
[INFO] --------------------------------------------------------------------------------------------------------------------------
According to my comment, just take a look and think about it. I know you want to get the release done (and it's a new dependency).
Created follup https://issues.apache.org/jira/browse/MNG-8459 and will merge this PR and close this RC3 issue. |
As it uses now String.format that produces different decimal separator based on local, most notable DE. This causes the UT to fail, and hence renders Maven non-buildable on DE systems.
https://issues.apache.org/jira/browse/MNG-8454