Locale issues with tests?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Locale issues with tests?

Christian Geisert
Hi,

'run-tests' gives me 52 failures on my machine. If I change the locale
to English (export LANG=en) there won't be any failures.

One example:

productionruntests
production-run-tests.testProductionRunQuickIssueAndProduce

Assertion failed: [materialAConsumedTotal=20] equals 2.0 as BigDecimal

  junit.framework.AssertionFailedError: Assertion failed:
[materialAConsumedTotal=20] equals 2.0 as BigDecimal
  at org.ofbiz.testtools.SimpleMethodTest.run(SimpleMethodTest.java:81)
  at org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:146)
  at
org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:100)
  at org.ofbiz.base.start.Start.startStartLoaders(Start.java:272)
  at org.ofbiz.base.start.Start.startServer(Start.java:322)
  at org.ofbiz.base.start.Start.start(Start.java:326)
  at org.ofbiz.base.start.Start.main(Start.java:411)


This smells like a locale/number format issue....
I've no time to have a closer look at this right now but maybe someone
has an idea how to fix it

Christian
Reply | Threaded
Open this post in threaded view
|

Re: Locale issues with tests?

Erwan de FERRIERES
Le 21/05/2010 16:07, Christian Geisert a écrit :

> Hi,
>
> 'run-tests' gives me 52 failures on my machine. If I change the locale
> to English (export LANG=en) there won't be any failures.
>
> One example:
>
> productionruntests
> production-run-tests.testProductionRunQuickIssueAndProduce
>
> Assertion failed: [materialAConsumedTotal=20] equals 2.0 as BigDecimal
>
> junit.framework.AssertionFailedError: Assertion failed:
> [materialAConsumedTotal=20] equals 2.0 as BigDecimal
> at org.ofbiz.testtools.SimpleMethodTest.run(SimpleMethodTest.java:81)
> at org.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:146)
> at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:100)
> at org.ofbiz.base.start.Start.startStartLoaders(Start.java:272)
> at org.ofbiz.base.start.Start.startServer(Start.java:322)
> at org.ofbiz.base.start.Start.start(Start.java:326)
> at org.ofbiz.base.start.Start.main(Start.java:411)
>
>
> This smells like a locale/number format issue....
> I've no time to have a closer look at this right now but maybe someone
> has an idea how to fix it
>
> Christian
>
Hi Chris,

you have to use the LC_ALL option. we found that some times ago. And I
haven't found the right way to make it persistent.

more info about it :
http://ofbiz.135035.n4.nabble.com/tests-in-error-td1334121.html

--
Erwan de FERRIERES
www.nereide.biz
Reply | Threaded
Open this post in threaded view
|

Re: Locale issues with tests?

Christian Geisert
Erwan de FERRIERES schrieb:
> Le 21/05/2010 16:07, Christian Geisert a écrit :
>> Hi,
>>
>> 'run-tests' gives me 52 failures on my machine. If I change the locale
>> to English (export LANG=en) there won't be any failures.

[..]

> you have to use the LC_ALL option. we found that some times ago. And I
> haven't found the right way to make it persistent.

The tests did work with LANG=en on my machine but I'd like to see the
tests running without failures regardless of the locale ;-)

Christian