[ 
https://issues.apache.org/jira/browse/KAFKA-8024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Patrik Kleindl reassigned KAFKA-8024:
-------------------------------------

    Assignee: Patrik Kleindl

> UtilsTest.testFormatBytes fails with german locale
> --------------------------------------------------
>
>                 Key: KAFKA-8024
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8024
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Patrik Kleindl
>            Assignee: Patrik Kleindl
>            Priority: Trivial
>
> The unit test fails when the default locale is not English (in my case, deAT)
> assertEquals("1.1 MB", formatBytes((long) (1.1 * 1024 * 1024)));
>  
> org.apache.kafka.common.utils.UtilsTest > testFormatBytes FAILED
>     org.junit.ComparisonFailure: expected:<1[.]1 MB> but was:<1[,]1 MB>
>         at org.junit.Assert.assertEquals(Assert.java:115)
>         at org.junit.Assert.assertEquals(Assert.java:144)
>         at 
> org.apache.kafka.common.utils.UtilsTest.testFormatBytes(UtilsTest.java:106)
>  
> The easiest fix in this case should be adding
> {code:java}
> jvmArgs '-Duser.language=en -Duser.country=US'{code}
> to the test configuration 
> [https://github.com/apache/kafka/blob/b03e8c234a8aeecd10c2c96b683cfb39b24b548a/build.gradle#L270]
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to