[ 
http://mifosforge.jira.com/browse/MIFOS-3613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59826#action_59826
 ] 

Adam Monsen edited comment on MIFOS-3613 at 8/31/10 5:03 PM:
-------------------------------------------------------------

"updated_integration_test.patch" is an updated version of the last patch. 
Instead of an ERROR, It FAILs at an interest calculation assertion. This 
applies cleanly to the 1.6.x branch (use "git apply").

{{SavingsBOIntegrationTest.testCalculateInterest_IntCalcFreqTenDays_avg()}} 
should fail with "expected:<1.2> but was:<0.0>" on line 3503.

If you set a breakpoint at the end of 
{{testCalculateInterest_IntCalcFreqTenDays_avg()}}, and take a peek at the 
database, you'll see incorrect balances in these columns:
* savings_trxn_detail.balance values
* savings_activity_details.balance_amount

{code}
mysql> select account_trxn_id,deposit_amount,balance from savings_trxn_detail;
+-----------------+----------------+-----------+
| account_trxn_id | deposit_amount | balance   |
+-----------------+----------------+-----------+
|               1 |      1000.0000 | 1000.0000 |
|               2 |      2500.0000 | 3500.0000 |
|               3 |      2000.0000 | -500.0000 |
|               4 |     -2500.0000 | 1000.0000 |
+-----------------+----------------+-----------+
4 rows in set (0.00 sec)

mysql> select id,amount,balance_amount from savings_activity_details;
+----+-----------+----------------+
| id | amount    | balance_amount |
+----+-----------+----------------+
|  1 | 2500.0000 |     -2500.0000 |
|  2 | 2000.0000 |      -500.0000 |
+----+-----------+----------------+
2 rows in set (0.00 sec)
{code}

Other open questions:
* if {{StaticHibernateUtil.closeSession();}} appears right after line 3492, an 
exception is thrown from 
{{SavingsBO.getLastTrxnForAdjustedPayment(AccountPaymentEntity)}} line 1337: 
{{java.lang.ClassCastException: 
org.mifos.accounts.business.AccountTrxnEntity_$$_javassist_39 cannot be cast to 
org.mifos.accounts.savings.business.SavingsTrxnDetailEntity}} (no idea why)
* how is interest calculation ever correct if these balance columns look so 
wrong?

      was (Author: meonkeys):
    "updated_integration_test.patch" is an updated version of the last patch. 
Instead of an ERROR, It FAILs at an interest calculation assertion. This 
applies cleanly to the 1.6.x branch (use "git apply").

{{SavingsBOIntegrationTest.testCalculateInterest_IntCalcFreqTenDays_avg()}} 
should fail with "expected:<1.2> but was:<0.0>" on line 3503.

If you set a breakpoint at the end of 
{{testCalculateInterest_IntCalcFreqTenDays_avg()}}, and take a peek at the 
database, you'll see incorrect(?) balances in these columns:
* savings_trxn_detail.balance values
* savings_activity_details.balance_amount

{code}
mysql> select account_trxn_id,deposit_amount,balance from savings_trxn_detail;
+-----------------+----------------+-----------+
| account_trxn_id | deposit_amount | balance   |
+-----------------+----------------+-----------+
|               1 |      1000.0000 | 1000.0000 |
|               2 |      2500.0000 | 3500.0000 |
|               3 |      2000.0000 | -500.0000 |
|               4 |     -2500.0000 | 1000.0000 |
+-----------------+----------------+-----------+
4 rows in set (0.00 sec)

mysql> select id,amount,balance_amount from savings_activity_details;
+----+-----------+----------------+
| id | amount    | balance_amount |
+----+-----------+----------------+
|  1 | 2500.0000 |     -2500.0000 |
|  2 | 2000.0000 |      -500.0000 |
+----+-----------+----------------+
2 rows in set (0.00 sec)
{code}

Other open questions:
* if {{StaticHibernateUtil.closeSession();}} appears right after line 3492, an 
exception is thrown from 
{{SavingsBO.getLastTrxnForAdjustedPayment(AccountPaymentEntity)}} line 1337: 
{{java.lang.ClassCastException: 
org.mifos.accounts.business.AccountTrxnEntity_$$_javassist_39 cannot be cast to 
org.mifos.accounts.savings.business.SavingsTrxnDetailEntity}} (no idea why)
* how is interest calculation ever correct if these balance columns look so 
wrong?
  
> make integration test
> ---------------------
>
>                 Key: MIFOS-3613
>                 URL: http://mifosforge.jira.com/browse/MIFOS-3613
>             Project: mifos
>          Issue Type: Dev Task
>          Components: Savings Account
>            Reporter: Adam Monsen
>             Fix For: Release E - Iteration 6, Release 1.6.1, Release E
>
>         Attachments: dev_only-add_adjustment.patch, 
> updated_integration_test.patch
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mifosforge.jira.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to