You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "cstamas (via GitHub)" <gi...@apache.org> on 2024/12/20 11:00:24 UTC

[PR] [MNG-8454] Force the FileSizeFormat UT to US Locale [maven]

cstamas opened a new pull request, #2003:
URL: https://github.com/apache/maven/pull/2003

   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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MNG-8454] Force the FileSizeFormat UT to US Locale [maven]

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #2003:
URL: https://github.com/apache/maven/pull/2003#issuecomment-2556817265

   Created follup https://issues.apache.org/jira/browse/MNG-8459 and will merge this PR and close this RC3 issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MNG-8454] Force the FileSizeFormat UT to US Locale [maven]

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on code in PR #2003:
URL: https://github.com/apache/maven/pull/2003#discussion_r1893825766


##########
impl/maven-cli/src/test/java/org/apache/maven/cling/transfer/FileSizeFormatTest.java:
##########
@@ -18,15 +18,33 @@
  */
 package org.apache.maven.cling.transfer;
 
+import java.util.Locale;
+
 import org.apache.maven.api.services.MessageBuilder;
 import org.apache.maven.cling.transfer.FileSizeFormat.ScaleUnit;
 import org.apache.maven.internal.impl.DefaultMessageBuilder;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
 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;

Review Comment:
   Created https://issues.apache.org/jira/browse/MNG-8459 to follow up, right now am interested in fixing this single failure only.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MNG-8454] Force the FileSizeFormat UT to US Locale [maven]

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas merged PR #2003:
URL: https://github.com/apache/maven/pull/2003


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MNG-8454] Force the FileSizeFormat UT to US Locale [maven]

Posted by "Bukama (via GitHub)" <gi...@apache.org>.
Bukama commented on code in PR #2003:
URL: https://github.com/apache/maven/pull/2003#discussion_r1893809053


##########
impl/maven-cli/src/test/java/org/apache/maven/cling/transfer/FileSizeFormatTest.java:
##########
@@ -18,15 +18,33 @@
  */
 package org.apache.maven.cling.transfer;
 
+import java.util.Locale;
+
 import org.apache.maven.api.services.MessageBuilder;
 import org.apache.maven.cling.transfer.FileSizeFormat.ScaleUnit;
 import org.apache.maven.internal.impl.DefaultMessageBuilder;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
 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;

Review Comment:
   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) 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org