adamsaghy commented on code in PR #5658:
URL: https://github.com/apache/fineract/pull/5658#discussion_r2995717675
##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/common/SchedulerJobHelper.java:
##########
@@ -218,18 +224,11 @@ public int getSchedulerJobIdByName(String jobName) {
"No such named Job (see
org.apache.fineract.infrastructure.jobs.service.JobName enum):" + jobName);
}
- // TODO: Rewrite to use fineract-client instead!
- // Example:
org.apache.fineract.integrationtests.common.loans.LoanTransactionHelper.disburseLoan(java.lang.Long,
- // org.apache.fineract.client.models.PostLoansLoanIdRequest)
- @Deprecated(forRemoval = true)
public int getSchedulerJobIdByShortName(String shortName) {
- Map<String, Object> jobMap = getSchedulerJobByShortName(shortName);
- final String GET_SCHEDULER_JOB_URL = "/fineract-provider/api/v1/jobs/"
+ SHORT_NAME_PARAM + "/" + shortName + "?"
- + Utils.TENANT_IDENTIFIER;
LOG.info("------------------------ RETRIEVING SCHEDULER JOB ID BY
SHORT NAME -------------------------");
- Integer response = (Integer) jobMap.get("jobId");
- assertNotNull(response);
- return response;
+ GetJobsResponse job =
Calls.ok(FineractClientHelper.getFineractClient().jobs.retrieveByShortName(shortName));
+ assertNotNull(job);
+ return job.getJobId().intValue();
Review Comment:
Return Long please!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]