[ 
https://issues.apache.org/jira/browse/FINERACT-885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17120596#comment-17120596
 ] 

Petri Tuomola commented on FINERACT-885:
----------------------------------------

Yesterday and today testLoanRefundByCashCashBasedAccounting (and other 
...refund... tests) are also failing.

I looked into this, and as far as I can see the reason is that February has 
less days than May :)

The tests create a loan that starts four calendar months ago on the same day: 
when the test is ran on 31st May, the loan starts on 31st Jan. 

The test expects that the 4th instalment is due today ie 31st May. 
But given February has 29 days this year, the instalment date gets reset to 
29th and stays there:

31st Jan disbursement
29th Feb instalment #1
29th Mar instalment #2
29th Apr instalment #3
29th May instalment #4 <--- this breaks the test, as now the 4th instalment is 
in the past rather than today

Need to think how to best fix this... but the good news is that it should work 
again tomorrow (and then for another 28 days)

> ClientLoanIntegrationTest is (still) "flaky"
> --------------------------------------------
>
>                 Key: FINERACT-885
>                 URL: https://issues.apache.org/jira/browse/FINERACT-885
>             Project: Apache Fineract
>          Issue Type: Bug
>            Reporter: Michael Vorburger
>            Priority: Major
>
> https://travis-ci.org/github/apache/fineract/builds/674307298 failed with:
> {noformat}org.apache.fineract.integrationtests.ClientLoanIntegrationTest > 
> testLoanScheduleWithInterestRecalculation_WITH_REST_DAILY_INTEREST_COMPOUND_INTEREST_FEE_STRATEGY_WITH_OVERDUE_CHARGE
>  FAILED
>     java.lang.ArrayIndexOutOfBoundsException at 
> ClientLoanIntegrationTest.java:3841{noformat}
> This cannot be due to the removal of the un-used 
> {{TimeZone.getTimeZone(tenant.getTimezoneId());}} in 
> {{fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/DateUtils.java}}
>  (for FINERACT-826) in https://github.com/apache/fineract/pull/755/files, but 
> is a "flaky" integration test.
> There have been issues about this before (FINERACT-7, FINERACT-453, 
> FINERACT-708, FINERACT-709, FINERACT-820), but they are all closed, so I'm 
> opening a new one, as this problem clearly still isn't solved.
> FINERACT-820 says "is flaky and always fails on Sundays", and 
> https://travis-ci.org/github/apache/fineract/builds/674307298 ran and failed 
> today on a Monday 11 AM CET (CH) time = Mon Apr 13 14:05:12 IST 2020, so this 
> may be something else?
> FINERACT-723 has something interesting that may be related to this? Even 
> though in https://github.com/apache/fineract/blob/develop/.travis.yml#L42 we 
> set {{export TZ=Asia/Kolkata}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to