FINERACT-1837: DelinquencyBucketsIntegrationTest performance

This commit is contained in:
Jose Alberto Hernandez
2022-12-28 19:13:15 +01:00
committed by Arnold Gálovics
parent 33610f52e3
commit fd3ad81f81
@@ -708,7 +708,7 @@ public class DelinquencyBucketsIntegrationTest {
GlobalConfigurationHelper.updateIsBusinessDateEnabled(requestSpec, responseSpec, Boolean.TRUE); GlobalConfigurationHelper.updateIsBusinessDateEnabled(requestSpec, responseSpec, Boolean.TRUE);
LocalDate businessDate = Utils.getLocalDateOfTenant(); LocalDate businessDate = Utils.getLocalDateOfTenant();
businessDate = businessDate.minusDays(57); businessDate = businessDate.minusDays(4);
log.info("Current date {}", businessDate); log.info("Current date {}", businessDate);
BusinessDateHelper.updateBusinessDate(requestSpec, responseSpec, BusinessDateType.BUSINESS_DATE, businessDate); BusinessDateHelper.updateBusinessDate(requestSpec, responseSpec, BusinessDateType.BUSINESS_DATE, businessDate);
@@ -721,16 +721,15 @@ public class DelinquencyBucketsIntegrationTest {
PostDelinquencyRangeResponse delinquencyRangeResponse = DelinquencyRangesHelper.createDelinquencyRange(requestSpec, responseSpec, PostDelinquencyRangeResponse delinquencyRangeResponse = DelinquencyRangesHelper.createDelinquencyRange(requestSpec, responseSpec,
jsonRange); jsonRange);
rangeIds.add(delinquencyRangeResponse.getResourceId()); rangeIds.add(delinquencyRangeResponse.getResourceId());
jsonRange = DelinquencyRangesHelper.getAsJSON(4, 60);
// Create
delinquencyRangeResponse = DelinquencyRangesHelper.createDelinquencyRange(requestSpec, responseSpec, jsonRange);
rangeIds.add(delinquencyRangeResponse.getResourceId());
final GetDelinquencyRangesResponse range = DelinquencyRangesHelper.getDelinquencyRange(requestSpec, responseSpec, final GetDelinquencyRangesResponse range = DelinquencyRangesHelper.getDelinquencyRange(requestSpec, responseSpec,
delinquencyRangeResponse.getResourceId()); delinquencyRangeResponse.getResourceId());
final String classificationExpected = range.getClassification(); final String classificationExpected = range.getClassification();
log.info("Expected Delinquency Range classification {}", classificationExpected); log.info("Expected Delinquency Range classification {}", classificationExpected);
jsonRange = DelinquencyRangesHelper.getAsJSON(4, 60);
delinquencyRangeResponse = DelinquencyRangesHelper.createDelinquencyRange(requestSpec, responseSpec, jsonRange);
rangeIds.add(delinquencyRangeResponse.getResourceId());
String jsonBucket = DelinquencyBucketsHelper.getAsJSON(rangeIds); String jsonBucket = DelinquencyBucketsHelper.getAsJSON(rangeIds);
PostDelinquencyBucketResponse delinquencyBucketResponse = DelinquencyBucketsHelper.createDelinquencyBucket(requestSpec, PostDelinquencyBucketResponse delinquencyBucketResponse = DelinquencyBucketsHelper.createDelinquencyBucket(requestSpec,
responseSpec, jsonBucket); responseSpec, jsonBucket);
@@ -747,7 +746,7 @@ public class DelinquencyBucketsIntegrationTest {
final LocalDate todaysDate = Utils.getLocalDateOfTenant(); final LocalDate todaysDate = Utils.getLocalDateOfTenant();
// Older date to have more than one overdue installment // Older date to have more than one overdue installment
final LocalDate transactionDate = todaysDate.minusDays(65); final LocalDate transactionDate = todaysDate.minusDays(33);
String operationDate = Utils.dateFormatter.format(transactionDate); String operationDate = Utils.dateFormatter.format(transactionDate);
// Create Loan Account // Create Loan Account
@@ -782,7 +781,7 @@ public class DelinquencyBucketsIntegrationTest {
// Move the Business date to get older the loan and to have an overdue loan // Move the Business date to get older the loan and to have an overdue loan
LocalDate lastLoanCOBBusinessDate = businessDate; LocalDate lastLoanCOBBusinessDate = businessDate;
businessDate = businessDate.plusDays(50); businessDate = businessDate.plusDays(3);
schedulerJobHelper.fastForwardTime(lastLoanCOBBusinessDate, businessDate, jobName, responseSpec); schedulerJobHelper.fastForwardTime(lastLoanCOBBusinessDate, businessDate, jobName, responseSpec);
log.info("Current date {}", businessDate); log.info("Current date {}", businessDate);
BusinessDateHelper.updateBusinessDate(requestSpec, responseSpec, BusinessDateType.BUSINESS_DATE, businessDate); BusinessDateHelper.updateBusinessDate(requestSpec, responseSpec, BusinessDateType.BUSINESS_DATE, businessDate);