You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Adam Saghy (Jira)" <ji...@apache.org> on 2025/10/07 17:17:00 UTC
[jira] [Resolved] (FINERACT-2378) Failing integration test: `org.apache.fineract.integrationtests.SchedulerJobsTestResults#testInterestTransferForSavings`
[ https://issues.apache.org/jira/browse/FINERACT-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Saghy resolved FINERACT-2378.
----------------------------------
Resolution: Fixed
> Failing integration test: `org.apache.fineract.integrationtests.SchedulerJobsTestResults#testInterestTransferForSavings`
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: FINERACT-2378
> URL: https://issues.apache.org/jira/browse/FINERACT-2378
> Project: Apache Fineract
> Issue Type: Bug
> Affects Versions: 1.12.1
> Reporter: Adam Saghy
> Assignee: Naphlin Peter Akena
> Priority: Critical
> Fix For: 1.13.0
>
> Attachments: 2025-09-09-002-test-result.tgz, image-2025-09-22-13-40-49-917.png
>
>
> Integration test started to fail:
> {code:java}
> org.apache.fineract.integrationtests.SchedulerJobsTestResults#testInterestTransferForSavings{code}
> *Test result*
>
> {code:java}
> org.opentest4j.AssertionFailedError: Verifying opening Balance ==> Expected :100000.0 Actual :99998.86 <Click to see difference> at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197) at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182) at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1156) at org.apache.fineract.integrationtests.SchedulerJobsTestResults.testInterestTransferForSavings(SchedulerJobsTestResults.java:1337) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) at java.base/java.util.ArrayList.forEach(ArrayList.java:1596){code}
> !image-2025-09-22-13-40-49-917.png!
> *Once it's fixed, remove @Disabled annotation from:*
> {noformat}
> org.apache.fineract.integrationtests.SchedulerJobsTestResults#testInterestTransferForSavings{noformat}
>
> Seems there is an another failing test:
>
> {code:java}
> org.apache.fineract.integrationtests.SavingsInterestPostingTest Test testOverdraftAndInterestPosting_WithOverdraftProduct_WhitBalanceGreaterZero() PASSED (4.1s) Test testPostInterestWithOverdraftProduct() FAILED (4s) org.opentest4j.AssertionFailedError: Expected exactly one INTEREST posting on posting date ==> expected: <1> but was: <0> at app//org.apache.fineract.integrationtests.SavingsInterestPostingTest.testPostInterestWithOverdraftProduct(SavingsInterestPostingTest.java:133) {code}
> *I was able to reproduce if i run `AccountTransferTest` (whole test class) and after i run*
> *`SavingsInterestPostingTest`.*
> *Backend console log*
>
> {code:java}
> Caused by: java.sql.BatchUpdateException: Batch entry 869 INSERT INTO acc_gl_journal_entry(account_id,office_id,reversal_id,currency_code,transaction_id,savings_transaction_id,client_transaction_id,reversed,ref_num,manual_entry,entry_date,type_enum,amount,description,entity_type_enum,entity_id,created_on_utc,last_modified_on_utc,is_running_balance_calculated,office_running_balance,organization_running_balance,payment_details_id,transaction_date,share_transaction_id, created_by, last_modified_by, submitted_on_date) VALUES (('0'::int8), ('18'::int8), (NULL), ('USD'), ('S243757'), ('243757'::int8), (NULL), ('FALSE'::boolean), (NULL), ('FALSE'::boolean), ('2013-04-01'::date), ('2'::int8), ('255.8444'::numeric), (NULL), ('2'::int8), ('36'::int8), ('2025-09-22 15:39:29.534134+00'::timestamp with time zone), ('2025-09-22 15:39:29.534134+00'::timestamp with time zone), ('FALSE'::boolean), ('0'::numeric), ('0'::numeric), (NULL), ('2013-04-01'::date), (NULL), ('2'::int8), ('2'::int8), ('2025-03-01'::date)) was aborted: ERROR: insert or update on table "acc_gl_journal_entry" violates foreign key constraint "FK_acc_gl_journal_entry_acc_gl_account" Detail: Key (account_id)=(0) is not present in table "acc_gl_account". Call getNextException to see other errors in the batch.{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)