You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by ka...@apache.org on 2020/06/03 00:59:24 UTC

[fineract] branch develop updated: executeAndAwaitJob() instead executeJob() in un-ignored FixedDepositTest

This is an automated email from the ASF dual-hosted git repository.

kaze pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 0c6903f  executeAndAwaitJob() instead executeJob() in un-ignored FixedDepositTest
0c6903f is described below

commit 0c6903fc369550c792e4be7c94fb7c558dd2390b
Author: Michael Vorburger <mi...@vorburger.ch>
AuthorDate: Mon Jun 1 15:46:08 2020 +0200

    executeAndAwaitJob() instead executeJob() in un-ignored FixedDepositTest
    
    re. FINERACT-950 and FINERACT-922
---
 .../fineract/integrationtests/FixedDepositTest.java  | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FixedDepositTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FixedDepositTest.java
index 4d88061..64f7c66 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FixedDepositTest.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FixedDepositTest.java
@@ -510,7 +510,7 @@ public class FixedDepositTest {
 
         SchedulerJobHelper schedulerJobHelper =  new SchedulerJobHelper(requestSpec);
         String JobName = "Update Deposit Accounts Maturity details";
-        schedulerJobHelper.executeJob(JobName);
+        schedulerJobHelper.executeAndAwaitJob(JobName);
 
         HashMap accountDetails = this.fixedDepositAccountHelper.getFixedDepositAccountById(this.requestSpec, this.responseSpec,
                 fixedDepositAccountId);
@@ -1493,7 +1493,7 @@ public class FixedDepositTest {
         Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
         principal += interestPerMonth;
         todaysDate.add(Calendar.DATE, daysInMonth);
-         LOG.info("{}",monthDayFormat.format(todaysDate.getTime()));
+        LOG.info("{}",monthDayFormat.format(todaysDate.getTime()));
 
         interestPerMonth = (float) (interestPerDay * principal * currentDate);
         LOG.info("IPM = {}" , interestPerMonth);
@@ -1604,7 +1604,7 @@ public class FixedDepositTest {
         Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
         principal += interestPerMonth;
         todaysDate.add(Calendar.DATE, daysInMonth);
-         LOG.info("{}",monthDayFormat.format(todaysDate.getTime()));
+        LOG.info("{}",monthDayFormat.format(todaysDate.getTime()));
 
         interestPerMonth = (float) (interestPerDay * principal * currentDate);
         LOG.info("IPM = {}" , interestPerMonth);
@@ -1719,7 +1719,7 @@ public class FixedDepositTest {
         Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
         principal += interestPerMonth;
         todaysDate.add(Calendar.DATE, daysInMonth);
-         LOG.info("{}",monthDayFormat.format(todaysDate.getTime()));
+        LOG.info("{}",monthDayFormat.format(todaysDate.getTime()));
 
         interestPerMonth = (float) (interestPerDay * principal * currentDate);
         LOG.info("IPM = {}" , interestPerMonth);
@@ -2404,7 +2404,7 @@ public class FixedDepositTest {
         final Account liabilityAccount = this.accountHelper.createLiabilityAccount();
 
         DateFormat dateFormat = new SimpleDateFormat("dd MMMM yyyy", Locale.US);
-        DateFormat monthDayFormat = new SimpleDateFormat("dd MMM", Locale.US);
+        new SimpleDateFormat("dd MMM", Locale.US);
         DateFormat currentDateFormat = new SimpleDateFormat("dd");
 
         Calendar todaysDate = Calendar.getInstance();
@@ -2418,14 +2418,11 @@ public class FixedDepositTest {
         final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
-        final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
 
         Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
-        final String INTEREST_POSTED_DATE = dateFormat.format(todaysDate.getTime());
-        final String CLOSED_ON_DATE = dateFormat.format(Calendar.getInstance().getTime());
 
         Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
         Assert.assertNotNull(clientId);
@@ -2489,7 +2486,7 @@ public class FixedDepositTest {
         final Account liabilityAccount = this.accountHelper.createLiabilityAccount();
 
         DateFormat dateFormat = new SimpleDateFormat("dd MMMM yyyy", Locale.US);
-        DateFormat monthDayFormat = new SimpleDateFormat("dd MMM", Locale.US);
+        new SimpleDateFormat("dd MMM", Locale.US);
         DateFormat currentDateFormat = new SimpleDateFormat("dd");
 
         Calendar todaysDate = Calendar.getInstance();
@@ -2503,14 +2500,11 @@ public class FixedDepositTest {
         final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
-        final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
 
         Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
-        final String INTEREST_POSTED_DATE = dateFormat.format(todaysDate.getTime());
-        final String CLOSED_ON_DATE = dateFormat.format(Calendar.getInstance().getTime());
 
         Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
         Assert.assertNotNull(clientId);
@@ -2624,7 +2618,7 @@ public class FixedDepositTest {
     }
 
     private Integer applyForFixedDepositApplication(final String clientID, final String productID, final String submittedOnDate,
-                                                    final String penalInterestType, final Integer maturityInstructionId) {
+            final String penalInterestType, final Integer maturityInstructionId) {
         LOG.info("--------------------------------APPLYING FOR FIXED DEPOSIT ACCOUNT --------------------------------");
         final String fixedDepositApplicationJSON = new FixedDepositAccountHelper(this.requestSpec, this.responseSpec) //
                 .withSubmittedOnDate(submittedOnDate)