You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Krishna Mewara (Jira)" <ji...@apache.org> on 2026/01/25 09:51:00 UTC
[jira] [Created] (FINERACT-2450) Fix fragile GlobalConfigurationHelper logic causing IndexOutOfBoundsException on new config addition
Krishna Mewara created FINERACT-2450:
----------------------------------------
Summary: Fix fragile GlobalConfigurationHelper logic causing IndexOutOfBoundsException on new config addition
Key: FINERACT-2450
URL: https://issues.apache.org/jira/browse/FINERACT-2450
Project: Apache Fineract
Issue Type: Bug
Components: Build, Test
Affects Versions: 1.14.0
Reporter: Krishna Mewara
*Context:* The integration test suite relies on {{GlobalConfigurationHelper}} to verify and reset global configurations during {{{}tearDown(){}}}.
*The Problem:* Currently, the helper methods (specifically in {{resetAllDefaultGlobalConfigurations}} and {{{}verifyAllDefaultGlobalConfigurations{}}}) appear to rely on hardcoded list sizes or loop indexes (e.g., iterating up to index 59).
When a new global configuration is added to the system (via Liquibase or other means), the total count of configurations increases. This causes {{SavingsInterestPostingJobIntegrationTest}} and other tests to fail immediately with: {{java.lang.IndexOutOfBoundsException: Index 59 out of bounds for length 59}}
This fragility blocks any developer from adding new global configurations to the platform without simultaneously refactoring the test harness in the same PR.
*Proposed Solution:* Refactor {{GlobalConfigurationHelper}} to remove hardcoded loops/indexes.
# Retrieve the full list of configurations dynamically.
# Use enhanced for-loops (or iterators) to iterate through the actual size of the list returned by the DB.
# Ensure {{tearDown}} logic is robust to the number of configurations present.
*Impact:* Fixing this will unblock pending feature work (e.g., FINERACT-2003 ,etc) and prevent future regressions when other configurations are added.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)