fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vorbur...@apache.org
Subject [fineract] branch develop updated: FINERACT-1065: Fixing integration test issues
Date Fri, 03 Jul 2020 14:08:09 GMT
This is an automated email from the ASF dual-hosted git repository.

vorburger 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 b61957a  FINERACT-1065: Fixing integration test issues
b61957a is described below

commit b61957acb20ede94bedd05edc95a505bc59ba513
Author: Petri Tuomola <petri@tuomola.org>
AuthorDate: Thu Jul 2 08:42:26 2020 +0300

    FINERACT-1065: Fixing integration test issues
---
 .../fineract/integrationtests/HookIntegrationTest.java  |  6 +++++-
 .../service/AdHocScheduledJobRunnerServiceImpl.java     |  5 +++--
 .../service/LoanArrearsAgingServiceImpl.java            |  2 +-
 .../domain/SavingsAccountTransactionRepository.java     |  4 +++-
 .../service/ScheduledJobRunnerServiceImpl.java          | 17 ++++++++++-------
 5 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/HookIntegrationTest.java
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/HookIntegrationTest.java
index 36cc3b2..1a45b4f 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/HookIntegrationTest.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/HookIntegrationTest.java
@@ -65,8 +65,10 @@ public class HookIntegrationTest {
         // http://www.jamesward.com/2014/06/11/testing-webhooks-was-a-pain-so-i-fixed-the-glitch
         final String uniqueId = UUID.randomUUID().toString();
         final String payloadURL = "http://echo-webhook.herokuapp.com:80/" + uniqueId + "?";
-        this.hookHelper.createHook(payloadURL);
+        final Integer hookId = this.hookHelper.createHook(payloadURL);
+        Assertions.assertNotNull(hookId);
         final Integer createdOfficeID = this.officeHelper.createOffice("01 January 2012");
+        Assertions.assertNotNull(createdOfficeID);
         try {
 
             /**
@@ -93,6 +95,8 @@ public class HookIntegrationTest {
                 fail("Failed to connect to https://echo-webhook.herokuapp.com platform");
             }
             throw new RuntimeException(e);
+        } finally {
+            this.hookHelper.deleteHook(hookId.longValue());
         }
 
     }
diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocScheduledJobRunnerServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocScheduledJobRunnerServiceImpl.java
index 10bfb70..8ddecf6 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocScheduledJobRunnerServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocScheduledJobRunnerServiceImpl.java
@@ -101,7 +101,8 @@ public class AdHocScheduledJobRunnerServiceImpl implements AdHocScheduledJobRunn
                             .append(adhoc.getQuery());
                     if (insertSqlBuilder.length() > 0) {
                         final int result = this.jdbcTemplate.update(insertSqlBuilder.toString());
-                        LOG.info("{}: Results affected by inserted: {}", ThreadLocalContextUtil.getTenant().getName(),
result);
+                        LOG.info("{}: Records affected by generateClientSchedule: {}", ThreadLocalContextUtil.getTenant().getName(),
+                                result);
 
                         this.jdbcTemplate.update("UPDATE m_adhoc SET last_run=? WHERE id=?",
new Date(), adhoc.getId());
                     }
@@ -111,7 +112,7 @@ public class AdHocScheduledJobRunnerServiceImpl implements AdHocScheduledJobRunn
                 }
             });
         } else {
-            LOG.info("{} Nothing to update", ThreadLocalContextUtil.getTenant().getName());
+            LOG.info("{}: Nothing to update by generateClientSchedule", ThreadLocalContextUtil.getTenant().getName());
         }
 
     }
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java
index 895ac44..5fd7674 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java
@@ -126,7 +126,7 @@ public class LoanArrearsAgingServiceImpl implements LoanArrearsAgingService,
Bus
             result += i;
         }
 
-        LOG.info("{}: Results affected by update: {}", ThreadLocalContextUtil.getTenant().getName(),
result);
+        LOG.info("{}: Records affected by updateLoanArrearsAgeingDetails: {}", ThreadLocalContextUtil.getTenant().getName(),
result);
     }
 
     @Override
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionRepository.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionRepository.java
index ec343da..b2fb567 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionRepository.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionRepository.java
@@ -21,11 +21,13 @@ package org.apache.fineract.portfolio.savings.domain;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
 
 public interface SavingsAccountTransactionRepository
         extends JpaRepository<SavingsAccountTransaction, Long>, JpaSpecificationExecutor<SavingsAccountTransaction>
{
 
     @Query("select sat from SavingsAccountTransaction sat where sat.id = :transactionId and
sat.savingsAccount.id = :savingsId")
-    SavingsAccountTransaction findOneByIdAndSavingsAccountId(Long transactionId, Long savingsId);
+    SavingsAccountTransaction findOneByIdAndSavingsAccountId(@Param("transactionId") Long
transactionId,
+            @Param("savingsId") Long savingsId);
 
 }
diff --git a/fineract-provider/src/main/java/org/apache/fineract/scheduledjobs/service/ScheduledJobRunnerServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/scheduledjobs/service/ScheduledJobRunnerServiceImpl.java
index 50c3182..36d27ba 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/scheduledjobs/service/ScheduledJobRunnerServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/scheduledjobs/service/ScheduledJobRunnerServiceImpl.java
@@ -175,7 +175,7 @@ public class ScheduledJobRunnerServiceImpl implements ScheduledJobRunnerService
 
         final int result = jdbcTemplate.update(updateSqlBuilder.toString());
 
-        LOG.info("{}: Results affected by update: {}", ThreadLocalContextUtil.getTenant().getName(),
result);
+        LOG.info("{}: Records affected by updateLoanSummaryDetails: {}", ThreadLocalContextUtil.getTenant().getName(),
result);
     }
 
     @Transactional
@@ -210,7 +210,7 @@ public class ScheduledJobRunnerServiceImpl implements ScheduledJobRunnerService
 
         final int result = jdbcTemplate.update(updateSqlBuilder.toString());
 
-        LOG.info("{}: Results affected by update: {}", ThreadLocalContextUtil.getTenant().getName(),
result);
+        LOG.info("{}: Records affected by updateLoanPaidInAdvance: {}", ThreadLocalContextUtil.getTenant().getName(),
result);
     }
 
     @Override
@@ -234,7 +234,8 @@ public class ScheduledJobRunnerServiceImpl implements ScheduledJobRunnerService
             }
         }
 
-        LOG.info("{}: Savings accounts affected by update: {}", ThreadLocalContextUtil.getTenant().getName(),
annualFeeData.size());
+        LOG.info("{}: Records affected by applyAnnualFeeForSavings: {}", ThreadLocalContextUtil.getTenant().getName(),
+                annualFeeData.size());
     }
 
     @Override
@@ -259,7 +260,8 @@ public class ScheduledJobRunnerServiceImpl implements ScheduledJobRunnerService
                 LOG.error("Apply Charges due for savings failed for account: {}", savingsAccountReference.getAccountNo(),
ex);
             }
         }
-        LOG.info("{}: Savings accounts affected by update: {}", ThreadLocalContextUtil.getTenant().getName(),
chargesDueData.size());
+        LOG.info("{}: Records affected by applyDueChargesForSavings: {}", ThreadLocalContextUtil.getTenant().getName(),
+                chargesDueData.size());
         if (!exceptions.isEmpty()) {
             throw new JobExecutionException(exceptions);
         }
@@ -297,7 +299,7 @@ public class ScheduledJobRunnerServiceImpl implements ScheduledJobRunnerService
 
         final int result = jdbcTemplate.update(updateSqlBuilder.toString());
 
-        LOG.info("{} : Results affected by update: {}", ThreadLocalContextUtil.getTenant().getName(),
result);
+        LOG.info("{}: Records affected by updateNPA: {}", ThreadLocalContextUtil.getTenant().getName(),
result);
     }
 
     @Override
@@ -321,7 +323,8 @@ public class ScheduledJobRunnerServiceImpl implements ScheduledJobRunnerService
             }
         }
 
-        LOG.info("{}: Deposit accounts affected by update: {}", ThreadLocalContextUtil.getTenant().getName(),
depositAccounts.size());
+        LOG.info("{}: Records affected by updateMaturityDetailsOfDepositAccounts: {}", ThreadLocalContextUtil.getTenant().getName(),
+                depositAccounts.size());
     }
 
     @Override
@@ -442,7 +445,7 @@ public class ScheduledJobRunnerServiceImpl implements ScheduledJobRunnerService
                     .append("group by je.account_id, je.office_id, je.transaction_date, Date(je.entry_date)");
 
             final int result = jdbcTemplate.update(sqlBuilder.toString(), formattedDate);
-            LOG.info("{}: Results affected by update: {}", ThreadLocalContextUtil.getTenant().getName(),
result);
+            LOG.info("{}: Records affected by updateTrialBalanceDetails: {}", ThreadLocalContextUtil.getTenant().getName(),
result);
         }
 
         // Updating closing balance


Mime
View raw message