This is an automated email from the ASF dual-hosted git repository. vorburger pushed a commit to branch FINERACT-820 in repository https://gitbox.apache.org/repos/asf/fineract.git
commit 3ed0177effda7c12f0ff56a0d3a40e489f15432c Author: Michael Vorburger ⛑️ <[email protected]> AuthorDate: Mon Jan 6 08:05:11 2020 +0100 Fix flaky LoanReschedulingWithinCenterTest so that it also passes on Sunday (FINERACT-820) --- .../integrationtests/LoanReschedulingWithinCenterTest.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java index 2928566..4fc3ecd 100644 --- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java +++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/LoanReschedulingWithinCenterTest.java @@ -18,7 +18,6 @@ */ package org.apache.fineract.integrationtests; - import static org.junit.Assert.assertEquals; import java.sql.Timestamp; @@ -76,10 +75,9 @@ public class LoanReschedulingWithinCenterTest { GlobalConfigurationHelper.verifyAllDefaultGlobalConfigurations(this.requestSpec, this.responseSpec); } - @SuppressWarnings("rawtypes") @Test + @SuppressWarnings("rawtypes") public void testCenterReschedulingLoansWithInterestRecalculationEnabled() { - Integer officeId = new OfficeHelper(requestSpec, responseSpec).createOffice("01 July 2007"); String name = "TestFullCreation" + new Timestamp(new java.util.Date().getTime()); String externalId = Utils.randomStringGenerator("ID_", 7, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); @@ -176,7 +174,7 @@ public class LoanReschedulingWithinCenterTest { final String startDate = dateFormat.format(today.getTime()); final String frequency = "2"; // 2:Weekly final String interval = "2"; // Every one week - final Integer repeatsOnDay = today.get(Calendar.DAY_OF_WEEK) - 1; + final Integer repeatsOnDay = today.get(Calendar.DAY_OF_WEEK); Integer calendarId = CalendarHelper.createMeetingForGroup(this.requestSpec, this.responseSpec, centerId, startDate, frequency, interval, repeatsOnDay.toString()); @@ -184,10 +182,9 @@ public class LoanReschedulingWithinCenterTest { return calendarId; } - @SuppressWarnings("rawtypes") @Test + @SuppressWarnings("rawtypes") public void testCenterReschedulingMultiTrancheLoansWithInterestRecalculationEnabled() { - Integer officeId = new OfficeHelper(requestSpec, responseSpec).createOffice("01 July 2007"); String name = "TestFullCreation" + new Timestamp(new java.util.Date().getTime()); String externalId = Utils.randomStringGenerator("ID_", 7, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); @@ -405,5 +402,4 @@ public class LoanReschedulingWithinCenterTest { date.add(type, addvalue); return new ArrayList<>(Arrays.asList(date.get(Calendar.YEAR), date.get(Calendar.MONTH) + 1, date.get(Calendar.DAY_OF_MONTH))); } - }
