[jira] [Commented] (FINERACT-1097) SchedularJob IT tests failing(org.awaitility.core.ConditionTimeoutException)

2020-07-26 Thread Yemdjih Kaze Nasser (Jira)


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

Yemdjih Kaze Nasser commented on FINERACT-1097:
---

You are right about that. So this error is only likely to occur locally in 
development as we do cause on travis each IT test I think run on a fresh 
database so we will never have the error popup there.

Concerning an appropriate solution, maybe we could use some data from 
fineract.dev([~vorburger] what do you think?) though I'm not sure if the data 
from there is even close to being realistic enough. If IT tests are not enough 
I can't really think of a way of simulating real world conditions for this.

> SchedularJob IT tests failing(org.awaitility.core.ConditionTimeoutException)
> 
>
> Key: FINERACT-1097
> URL: https://issues.apache.org/jira/browse/FINERACT-1097
> Project: Apache Fineract
>  Issue Type: Bug
>Affects Versions: 1.4.0
>Reporter: Yemdjih Kaze Nasser
>Priority: Major
>
> While looking into 
> [FINERACT-1069|https://issues.apache.org/jira/browse/FINERACT-1069], I 
> stumbled upon some schedular IT test errors which I faced when working on 
> migrating the JPA so originally I thought something was wrong with some of 
> the changes I made. Seeing thesame error with OpenJPA on branch develop tells 
> me this deserves more attention. Here are the logs:
>  
> {code:java}
> SchedulerJobsTest > testTriggeringManualExecutionOfAllSchedulerJobs() FAILED
>     org.awaitility.core.ConditionTimeoutException: Lambda expression in 
> org.apache.fineract.integrationtests.common.SchedulerJobHelper: expected the 
> predicate to ret
> urn  but it returned  for input of <{version=4, 
> jobRunStartTime=2020-07-26T16:52:28Z, jobRunEndTime=2020-07-26T16:52:47Z, 
> status=success, triggerType=ap
> plication}> within 30 seconds.
>     at 
> org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
>     at 
> org.awaitility.core.AbstractHamcrestCondition.await(AbstractHamcrestCondition.java:86)
>     at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:895)
>     at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:601)
>     at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:618)
>     at 
> org.apache.fineract.integrationtests.common.SchedulerJobHelper.executeAndAwaitJob(SchedulerJobHelper.java:165)
>     at 
> org.apache.fineract.integrationtests.SchedulerJobsTest.testTriggeringManualExecutionOfAllSchedulerJobs(SchedulerJobsTest.java:132)
>     Caused by:
>     java.util.concurrent.TimeoutException
>     at 
> java.base/java.util.concurrent.FutureTask.get(FutureTask.java:204)
>     at 
> org.awaitility.core.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:101)
>     at 
> org.awaitility.core.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:81)
>     at 
> org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:101)
>     ... 6 more
> SchedulerJobsTestResults > testUpdateAccountingRunningBalancesJobOutcome() 
> FAILED
>     org.awaitility.core.ConditionTimeoutException: Lambda expression in 
> org.apache.fineract.integrationtests.common.SchedulerJobHelper: expected the 
> predicate to ret
> urn  but it returned  for input of <{version=1, 
> jobRunStartTime=2020-07-16T18:31:00Z, jobRunEndTime=2020-07-16T18:31:00Z, 
> status=success, triggerType=cr
> on}> within 30 seconds.
>     at 
> org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
>     at 
> org.awaitility.core.AbstractHamcrestCondition.await(AbstractHamcrestCondition.java:86)
>     at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:895)
>     at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:601)
>     at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:618)
>     at 
> org.apache.fineract.integrationtests.common.SchedulerJobHelper.executeAndAwaitJob(SchedulerJobHelper.java:165)
>     at 
> org.apache.fineract.integrationtests.SchedulerJobsTestResults.testUpdateAccountingRunningBalancesJobOutcome(SchedulerJobsTestResults.java:423)
> SchedulerJobsTestResults > testInterestPostingForSavingsJobOutcome() FAILED
>     org.awaitility.core.ConditionTimeoutException: Lambda expression in 
> org.apache.fineract.integrationtests.common.SchedulerJobHelper: expected the 
> predicate to ret
> urn  but it returned  for input of <{version=5, 
> jobRunStartTime=2020-07-26T18:11:18Z, jobRunEndTime=2020-07-26T18:12:54Z, 
> status=success, triggerType=ap
> plication}> within 30 seconds.
>     at 
> org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
>    

[jira] [Commented] (FINERACT-1097) SchedularJob IT tests failing(org.awaitility.core.ConditionTimeoutException)

2020-07-26 Thread Petri Tuomola (Jira)


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

Petri Tuomola commented on FINERACT-1097:
-

Hi [~kaze] - I've hit the same issue before, and by extending the timeout for 
the tests from 30 seconds to a much larger number the scheduled jobs completed 
without issues.

It seems that some of the scheduled jobs are pretty inefficient at processing 
the data. If you run the integration tests with an empty database, the jobs 
pass within the 30 second timeout. But if you have already ran the integration 
tests multiple times (and hence have some more data in the database), the 
processing takes too long to complete in 30 seconds and you get this error.

In general I think it would definitely be a good idea to look to performance 
tune the batch jobs (as well as the rest of Fineract!). But in my view it would 
be good to do this performance tuning with realistic data, workload & setup - 
so that the performance tuning actually helps real Fineract installations and 
not just the integration tests. 

> SchedularJob IT tests failing(org.awaitility.core.ConditionTimeoutException)
> 
>
> Key: FINERACT-1097
> URL: https://issues.apache.org/jira/browse/FINERACT-1097
> Project: Apache Fineract
>  Issue Type: Bug
>Affects Versions: 1.4.0
>Reporter: Yemdjih Kaze Nasser
>Priority: Major
>
> While looking into 
> [FINERACT-1069|https://issues.apache.org/jira/browse/FINERACT-1069], I 
> stumbled upon some schedular IT test errors which I faced when working on 
> migrating the JPA so originally I thought something was wrong with some of 
> the changes I made. Seeing thesame error with OpenJPA on branch develop tells 
> me this deserves more attention. Here are the logs:
>  
> {code:java}
> SchedulerJobsTest > testTriggeringManualExecutionOfAllSchedulerJobs() FAILED
>     org.awaitility.core.ConditionTimeoutException: Lambda expression in 
> org.apache.fineract.integrationtests.common.SchedulerJobHelper: expected the 
> predicate to ret
> urn  but it returned  for input of <{version=4, 
> jobRunStartTime=2020-07-26T16:52:28Z, jobRunEndTime=2020-07-26T16:52:47Z, 
> status=success, triggerType=ap
> plication}> within 30 seconds.
>     at 
> org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
>     at 
> org.awaitility.core.AbstractHamcrestCondition.await(AbstractHamcrestCondition.java:86)
>     at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:895)
>     at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:601)
>     at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:618)
>     at 
> org.apache.fineract.integrationtests.common.SchedulerJobHelper.executeAndAwaitJob(SchedulerJobHelper.java:165)
>     at 
> org.apache.fineract.integrationtests.SchedulerJobsTest.testTriggeringManualExecutionOfAllSchedulerJobs(SchedulerJobsTest.java:132)
>     Caused by:
>     java.util.concurrent.TimeoutException
>     at 
> java.base/java.util.concurrent.FutureTask.get(FutureTask.java:204)
>     at 
> org.awaitility.core.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:101)
>     at 
> org.awaitility.core.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:81)
>     at 
> org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:101)
>     ... 6 more
> SchedulerJobsTestResults > testUpdateAccountingRunningBalancesJobOutcome() 
> FAILED
>     org.awaitility.core.ConditionTimeoutException: Lambda expression in 
> org.apache.fineract.integrationtests.common.SchedulerJobHelper: expected the 
> predicate to ret
> urn  but it returned  for input of <{version=1, 
> jobRunStartTime=2020-07-16T18:31:00Z, jobRunEndTime=2020-07-16T18:31:00Z, 
> status=success, triggerType=cr
> on}> within 30 seconds.
>     at 
> org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
>     at 
> org.awaitility.core.AbstractHamcrestCondition.await(AbstractHamcrestCondition.java:86)
>     at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:895)
>     at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:601)
>     at 
> org.awaitility.core.ConditionFactory.until(ConditionFactory.java:618)
>     at 
> org.apache.fineract.integrationtests.common.SchedulerJobHelper.executeAndAwaitJob(SchedulerJobHelper.java:165)
>     at 
> org.apache.fineract.integrationtests.SchedulerJobsTestResults.testUpdateAccountingRunningBalancesJobOutcome(SchedulerJobsTestResults.java:423)
> SchedulerJobsTestResults > testInterestPostingForSavingsJobOutcome() FAILED
>     org.awaitility.core.ConditionTimeoutException: Lambda expression i