You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@fineract.apache.org by Angel Cajas <an...@bowpi.com> on 2019/06/19 18:22:04 UTC

Running IntegrationTest using different locale values

Hi developers,

Recently I've been running the integrationTest gradle task and noticed that some tests were failing for me, however it seems that they work perfectly for other people.

I noticed that most of those test failed because of the date format being used: "dd MMMM yyyy "  and because there seems to be some locale differences between my computer and the ones being used in Fineract responses which causes some tests to fail. Adding a locale parameter to the some StringFormat objects helped me to reduce the number of test but that only make me question if are there some computer settings that I should have to run integration test these integration tests?

I would really appreciate you answers

Regards, Angel

RE: Running IntegrationTest using different locale values

Posted by Angel Cajas <an...@bowpi.com>.
Hi Vishwas

Thanks for providing a detailed answer about this issue, now I know the reason why theintegration tests were failing on my machine.

Regards, Angel



From: Vishwas Babu <vi...@confluxtechnologies.com>
Sent: sábado, 22 de junio de 2019 01:07
To: Dev <de...@fineract.apache.org>
Subject: Re: Running IntegrationTest using different locale values

Hi Angel,

>>Recently I’ve been running the integrationTest gradle task and noticed that some tests were failing for me, however it seems that they work perfectly for other people
This could be caused by

1) Integration tests fail when the default tenant has a different time-zone than the system(s) running the application and database servers - Additional details and suggested fixes at https://issues.apache.org/jira/browse/FINERACT-723
2) Integration test cases fail when run on the 1st of a month - https://issues.apache.org/jira/browse/FINERACT-722

To ensure Integration tests are stable on Travis, we hardcode the system timezone to Asia/Kolkata (which is the same timezone of the default tenant) and set the system date to the 23rd of Feb 2019.

Regards,
Vishwas

On Wed, Jun 19, 2019 at 11:22 AM Angel Cajas <an...@bowpi.com>> wrote:
Hi developers,

Recently I’ve been running the integrationTest gradle task and noticed that some tests were failing for me, however it seems that they work perfectly for other people.

I noticed that most of those test failed because of the date format being used: “dd MMMM yyyy “  and because there seems to be some locale differences between my computer and the ones being used in Fineract responses which causes some tests to fail. Adding a locale parameter to the some StringFormat objects helped me to reduce the number of test but that only make me question if are there some computer settings that I should have to run integration test these integration tests?

I would really appreciate you answers

Regards, Angel

Re: Running IntegrationTest using different locale values

Posted by Vishwas Babu <vi...@confluxtechnologies.com>.
Hi Angel,

>>Recently I’ve been running the integrationTest gradle task and noticed
that some tests were failing for me, however it seems that they work
perfectly for other people
This could be caused by

1) Integration tests fail when the default tenant has a different time-zone
than the system(s) running the application and database servers -
Additional details and suggested fixes at
https://issues.apache.org/jira/browse/FINERACT-723
2) Integration test cases fail when run on the 1st of a month -
https://issues.apache.org/jira/browse/FINERACT-722

To ensure Integration tests are stable on Travis, we hardcode the system
timezone to Asia/Kolkata (which is the same timezone of the default tenant)
and set the system date to the 23rd of Feb 2019.

Regards,
Vishwas

On Wed, Jun 19, 2019 at 11:22 AM Angel Cajas <an...@bowpi.com> wrote:

> Hi developers,
>
>
>
> Recently I’ve been running the integrationTest gradle task and noticed
> that some tests were failing for me, however it seems that they work
> perfectly for other people.
>
>
>
> I noticed that most of those test failed because of the date format being
> used: “dd MMMM yyyy “  and because there seems to be some locale
> differences between my computer and the ones being used in Fineract
> responses which causes some tests to fail. Adding a locale parameter to the
> some StringFormat objects helped me to reduce the number of test but that
> only make me question if are there some computer settings that I should
> have to run integration test these integration tests?
>
>
>
> I would really appreciate you answers
>
>
>
> Regards, Angel
>

Re: Running IntegrationTest using different locale values

Posted by Michael Vorburger <mi...@vorburger.ch>.
What OS do you run on?

I'm not 100% sure how Java determines its default Locale, but on Linux it
may be determined by the environment variable named LANG.

Easiest for you is probably to change the Locale in your OS' Desktop's
Settings, usually in a Preferences section labeled something like
International.

BTW: The real underlying cause of the problem here is that, apparently,
some code in Fineract reads the default Locale. That's not ideal; in a
perfect world, it would read this from either a global Setting or user
level preference in Fineract (DB) instead of the OS. Just sayin', in case
you'd like to dig into it... ;-)

HTH.

On Wed, 19 Jun 2019, 20:22 Angel Cajas, <an...@bowpi.com> wrote:

> Hi developers,
>
>
>
> Recently I’ve been running the integrationTest gradle task and noticed
> that some tests were failing for me, however it seems that they work
> perfectly for other people.
>
>
>
> I noticed that most of those test failed because of the date format being
> used: “dd MMMM yyyy “  and because there seems to be some locale
> differences between my computer and the ones being used in Fineract
> responses which causes some tests to fail. Adding a locale parameter to the
> some StringFormat objects helped me to reduce the number of test but that
> only make me question if are there some computer settings that I should
> have to run integration test these integration tests?
>
>
>
> I would really appreciate you answers
>
>
>
> Regards, Angel
>