[jira] [Resolved] (FINERACT-820) LoanReschedulingWithinCenterTest is flaky and always fails on Sundays

2020-01-24 Thread Nazeer Shaik (Jira)


 [ 
https://issues.apache.org/jira/browse/FINERACT-820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nazeer Shaik resolved FINERACT-820.
---
Fix Version/s: 1.4.0
 Assignee: Michael Vorburger  (was: Nazeer Shaik)
   Resolution: Fixed

> LoanReschedulingWithinCenterTest is flaky and always fails on Sundays
> -
>
> Key: FINERACT-820
> URL: https://issues.apache.org/jira/browse/FINERACT-820
> Project: Apache Fineract
>  Issue Type: Improvement
>Reporter: Michael Vorburger
>Assignee: Michael Vorburger
>Priority: Major
> Fix For: 1.4.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> https://github.com/apache/fineract/pull/678 for FINERACT-726 just failed due 
> to:
> {noformat}> Task :integrationTest 
>   
>   
>   
>   
> 
> 344 tests completed, 2 failed, 14 skipped{noformat}
> due to:
> 1. org.apache.fineract.integrationtests.LoanReschedulingWithinCenterTest
> {noformat}at 
> org.apache.fineract.integrationtests.common.Utils.performServerPost(Utils.java:156)
> at 
> org.apache.fineract.integrationtests.common.CalendarHelper.createMeetingForGroup(CalendarHelper.java:101)
> at 
> org.apache.fineract.integrationtests.LoanReschedulingWithinCenterTest.createCalendarMeeting(LoanReschedulingWithinCenterTest.java:181)
> at 
> org.apache.fineract.integrationtests.LoanReschedulingWithinCenterTest.testCenterReschedulingLoansWithInterestRecalculationEnabled(LoanReschedulingWithinCenterTest.java:97)
> ---LOGIN-
>  RETRIEVING ALL GLOBAL CONFIGURATIONS 
> -
> map : {dateFormat=dd  , name=Office_PLBT, locale=en, openingDate=01 
> July 2007, parentId=1}
> map : {firstname=michael_U2MM2, officeId=1, dateFormat=dd  , 
> joiningDate=20 September 2011, isLoanOfficer=true, locale=en, 
> lastname=Doe_URN3}
> CREATING CENTER-
>  RETRIEVING CENTER AT 180-
> -CREATING A MEETING CALENDAR FOR THE 
> GROUP--
> /fineract-provider/api/v1/centers/180/calendars?tenantIdentifier=default
> map : {repeatsOnDay=0, dateFormat=dd  , repeating=true, interval=2, 
> typeId=1, locale=en, title=groups_CollectionMeetingF3FP, startDate=05 January 
> 2020, frequency=2}
> HTTP/1.1 400 Bad Request
> Server: Apache-Coyote/1.1
> X-Notification-Refresh: true
> Access-Control-Allow-Origin: *
> Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
> Cache-Control: no-cache, no-store, max-age=0, must-revalidate
> Pragma: no-cache
> Expires: 0
> Strict-Transport-Security: max-age=31536000 ; includeSubDomains
> X-XSS-Protection: 1; mode=block
> X-Frame-Options: DENY
> X-Content-Type-Options: nosniff
> Content-Type: application/json
> Transfer-Encoding: chunked
> Date: Sun, 05 Jan 2020 17:57:32 GMT
> Connection: close
> {
> developerMessage: The request was invalid. This 
> typically will happen due to validation errors which are provided.,
> httpStatusCode: 400,
> defaultUserMessage: Validation errors exist.,
> userMessageGlobalisationCode: 
> validation.msg.validation.errors.exist,
> errors: [
> {
> developerMessage: The parameter repeatsOnDay 
> must be between 1 and 7.,
> defaultUserMessage: The parameter repeatsOnDay 
> must be between 1 and 7.,
> userMessageGlobalisationCode: 
> validation.msg.calendar.repeatsOnDay.is.not.within.expected.range,
> parameterName: repeatsOnDay,
> value: null,
> args: [
> {
> value: 0
> },
> {
> value: 1
> },
> {
> value: 7
> }
> ]
> }
> ]
> }{noformat}
> 2. testCenterReschedulingMultiTrancheLoansWithInterestRecalculationEnabled
> If _The parameter repeatsOnDay must be between 1 and 7._ then probably doing 
> {{repeatsOnDay = today.get(Calendar.DAY_OF_WEEK) - 1;}} in 
> https://github.com/apache/fineract/blob/develop/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java
>  isn't great?
> {noformat}{noformat}



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


[jira] [Assigned] (FINERACT-820) LoanReschedulingWithinCenterTest is flaky and always fails on Sundays

2020-01-24 Thread Nazeer Shaik (Jira)


 [ 
https://issues.apache.org/jira/browse/FINERACT-820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nazeer Shaik reassigned FINERACT-820:
-

Assignee: Nazeer Shaik

> LoanReschedulingWithinCenterTest is flaky and always fails on Sundays
> -
>
> Key: FINERACT-820
> URL: https://issues.apache.org/jira/browse/FINERACT-820
> Project: Apache Fineract
>  Issue Type: Improvement
>Reporter: Michael Vorburger
>Assignee: Nazeer Shaik
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> https://github.com/apache/fineract/pull/678 for FINERACT-726 just failed due 
> to:
> {noformat}> Task :integrationTest 
>   
>   
>   
>   
> 
> 344 tests completed, 2 failed, 14 skipped{noformat}
> due to:
> 1. org.apache.fineract.integrationtests.LoanReschedulingWithinCenterTest
> {noformat}at 
> org.apache.fineract.integrationtests.common.Utils.performServerPost(Utils.java:156)
> at 
> org.apache.fineract.integrationtests.common.CalendarHelper.createMeetingForGroup(CalendarHelper.java:101)
> at 
> org.apache.fineract.integrationtests.LoanReschedulingWithinCenterTest.createCalendarMeeting(LoanReschedulingWithinCenterTest.java:181)
> at 
> org.apache.fineract.integrationtests.LoanReschedulingWithinCenterTest.testCenterReschedulingLoansWithInterestRecalculationEnabled(LoanReschedulingWithinCenterTest.java:97)
> ---LOGIN-
>  RETRIEVING ALL GLOBAL CONFIGURATIONS 
> -
> map : {dateFormat=dd  , name=Office_PLBT, locale=en, openingDate=01 
> July 2007, parentId=1}
> map : {firstname=michael_U2MM2, officeId=1, dateFormat=dd  , 
> joiningDate=20 September 2011, isLoanOfficer=true, locale=en, 
> lastname=Doe_URN3}
> CREATING CENTER-
>  RETRIEVING CENTER AT 180-
> -CREATING A MEETING CALENDAR FOR THE 
> GROUP--
> /fineract-provider/api/v1/centers/180/calendars?tenantIdentifier=default
> map : {repeatsOnDay=0, dateFormat=dd  , repeating=true, interval=2, 
> typeId=1, locale=en, title=groups_CollectionMeetingF3FP, startDate=05 January 
> 2020, frequency=2}
> HTTP/1.1 400 Bad Request
> Server: Apache-Coyote/1.1
> X-Notification-Refresh: true
> Access-Control-Allow-Origin: *
> Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
> Cache-Control: no-cache, no-store, max-age=0, must-revalidate
> Pragma: no-cache
> Expires: 0
> Strict-Transport-Security: max-age=31536000 ; includeSubDomains
> X-XSS-Protection: 1; mode=block
> X-Frame-Options: DENY
> X-Content-Type-Options: nosniff
> Content-Type: application/json
> Transfer-Encoding: chunked
> Date: Sun, 05 Jan 2020 17:57:32 GMT
> Connection: close
> {
> developerMessage: The request was invalid. This 
> typically will happen due to validation errors which are provided.,
> httpStatusCode: 400,
> defaultUserMessage: Validation errors exist.,
> userMessageGlobalisationCode: 
> validation.msg.validation.errors.exist,
> errors: [
> {
> developerMessage: The parameter repeatsOnDay 
> must be between 1 and 7.,
> defaultUserMessage: The parameter repeatsOnDay 
> must be between 1 and 7.,
> userMessageGlobalisationCode: 
> validation.msg.calendar.repeatsOnDay.is.not.within.expected.range,
> parameterName: repeatsOnDay,
> value: null,
> args: [
> {
> value: 0
> },
> {
> value: 1
> },
> {
> value: 7
> }
> ]
> }
> ]
> }{noformat}
> 2. testCenterReschedulingMultiTrancheLoansWithInterestRecalculationEnabled
> If _The parameter repeatsOnDay must be between 1 and 7._ then probably doing 
> {{repeatsOnDay = today.get(Calendar.DAY_OF_WEEK) - 1;}} in 
> https://github.com/apache/fineract/blob/develop/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java
>  isn't great?
> {noformat}{noformat}



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


[jira] [Commented] (FINERACT-839) NPE when creating a Loan for a client

2020-01-24 Thread Adam Saghy (Jira)


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

Adam Saghy commented on FINERACT-839:
-

I dont have the proper insight to decide on that. From my experience NULL, 
FALSE, TRUE has different meanings, so i am not sure on this. If there is 
someone, who can clarify from business side then it would be really good.

> NPE when creating a Loan for a client
> -
>
> Key: FINERACT-839
> URL: https://issues.apache.org/jira/browse/FINERACT-839
> Project: Apache Fineract
>  Issue Type: Bug
>  Components: Client
>Affects Versions: 1.4.0
>Reporter: Adam Saghy
>Assignee: Adam Saghy
>Priority: Blocker
> Fix For: 1.4.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Getting a NullPointerException during the creation of a Loan for a client.
> The problem seems to come when the 
> *LoanProductData.isInterestRecalculationEnabled* is *false* and calling the 
> *LoadProductData.isCompoundingToBePostedAsTransaction()* method where it 
> would call the  *interestRecalculationData* which is *null*.
> *It seems reasonable to be null as the interest recalculation is not enabled.*
> There was a commit:
>  
> {code:java}
> commit af0dd7e5f3856eb0fc5b7441c8ec51941e1764d1 Author: Awasum Yannick Date: 
> 10/12/2019, 17:37 use SpotBugs & fix over 300 high priority rule violations 
> (FINERACT-702) This PR also serves as a base solution for upcoming 
> FINERACT-712 and FINERACT-696. It includes using Objects.equals() to prevent 
> NPEs, and adding gradle check to run SpotBugs on Travis CI. PS: SpotBugs is 
> the successor to (and same code as) FindBugs.{code}
> which changed the business logic but my theory is that it might be a mistake.
>  
> Before the commit:
>  
> {code:java}
> if (isInterestRecalculationEnabled()) {
>  return this.interestRecalculationData.isCompoundingToBePostedAsTransaction();
> }
> return null;
> {code}
>  
> After the commit:
>  
> {code:java}
> if (isInterestRecalculationEnabled()) {
>  return this.interestRecalculationData.isCompoundingToBePostedAsTransaction();
> } 
> return 
> !this.interestRecalculationData.isCompoundingToBePostedAsTransaction();{code}
>  
> The NPE is coming for the below line:
>  
> {code:java}
> return 
> !this.interestRecalculationData.isCompoundingToBePostedAsTransaction();{code}
>  
>  
> Could you please validate my theory?
>  
>  



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