use of org.finra.herd.model.api.xml.SystemJobRunResponse in project herd by FINRAOS.
the class SystemJobServiceTest method testRunSystemJobFileUploadCleanupLowerCaseParameters.
@Test
public void testRunSystemJobFileUploadCleanupLowerCaseParameters() throws Exception {
// Create a system job run request using lower case input parameters (except for case-sensitive job name).
SystemJobRunRequest systemJobRunRequest = new SystemJobRunRequest(FileUploadCleanupJob.JOB_NAME, Arrays.asList(new Parameter(ConfigurationValue.FILE_UPLOAD_CLEANUP_JOB_THRESHOLD_MINUTES.getKey().toLowerCase(), String.valueOf(INTEGER_VALUE))));
// Request to run the system job.
SystemJobRunResponse resultSystemJobRunResponse = systemJobService.runSystemJob(systemJobRunRequest);
// Validate the returned object.
assertEquals(new SystemJobRunResponse(FileUploadCleanupJob.JOB_NAME, Arrays.asList(new Parameter(ConfigurationValue.FILE_UPLOAD_CLEANUP_JOB_THRESHOLD_MINUTES.getKey().toLowerCase(), String.valueOf(INTEGER_VALUE)))), resultSystemJobRunResponse);
}
use of org.finra.herd.model.api.xml.SystemJobRunResponse in project herd by FINRAOS.
the class SystemJobServiceTest method testRunSystemJobJmsPublisher.
// JMS publisher system job
@Test
public void testRunSystemJobJmsPublisher() throws Exception {
// Create the system job run request.
SystemJobRunRequest systemJobRunRequest = new SystemJobRunRequest(JmsPublishingJob.JOB_NAME, null);
// Request to run the system job.
SystemJobRunResponse resultSystemJobRunResponse = systemJobService.runSystemJob(systemJobRunRequest);
// Validate the returned object.
assertEquals(new SystemJobRunResponse(JmsPublishingJob.JOB_NAME, null), resultSystemJobRunResponse);
}
use of org.finra.herd.model.api.xml.SystemJobRunResponse in project herd by FINRAOS.
the class SystemJobServiceTest method testRunSystemJobBusinessObjectDataFinalizeRestore.
// Business object data finalize restore system job
@Test
public void testRunSystemJobBusinessObjectDataFinalizeRestore() throws Exception {
// Create the system job run request.
SystemJobRunRequest systemJobRunRequest = new SystemJobRunRequest(BusinessObjectDataFinalizeRestoreJob.JOB_NAME, Arrays.asList(new Parameter(ConfigurationValue.BDATA_FINALIZE_RESTORE_JOB_MAX_BDATA_INSTANCES.getKey(), String.valueOf(INTEGER_VALUE))));
// Request to run the system job.
SystemJobRunResponse resultSystemJobRunResponse = systemJobService.runSystemJob(systemJobRunRequest);
// Validate the returned object.
assertEquals(new SystemJobRunResponse(BusinessObjectDataFinalizeRestoreJob.JOB_NAME, Arrays.asList(new Parameter(ConfigurationValue.BDATA_FINALIZE_RESTORE_JOB_MAX_BDATA_INSTANCES.getKey(), String.valueOf(INTEGER_VALUE)))), resultSystemJobRunResponse);
}
use of org.finra.herd.model.api.xml.SystemJobRunResponse in project herd by FINRAOS.
the class SystemJobServiceTest method testRunSystemJobBusinessObjectDataFinalizeRestoreMissingOptionalParameters.
@Test
public void testRunSystemJobBusinessObjectDataFinalizeRestoreMissingOptionalParameters() throws Exception {
// Create the system job run request without parameters.
SystemJobRunRequest systemJobRunRequest = new SystemJobRunRequest(BusinessObjectDataFinalizeRestoreJob.JOB_NAME, null);
// Request to run the system job.
SystemJobRunResponse resultSystemJobRunResponse = systemJobService.runSystemJob(systemJobRunRequest);
// Validate the returned object.
assertEquals(new SystemJobRunResponse(BusinessObjectDataFinalizeRestoreJob.JOB_NAME, null), resultSystemJobRunResponse);
}
use of org.finra.herd.model.api.xml.SystemJobRunResponse in project herd by FINRAOS.
the class SystemJobRestControllerTest method testRunSystemJobFileUploadCleanup.
@Test
public void testRunSystemJobFileUploadCleanup() throws Exception {
// Create the system job run request.
SystemJobRunRequest systemJobRunRequest = new SystemJobRunRequest(FileUploadCleanupJob.JOB_NAME, Arrays.asList(new Parameter(ConfigurationValue.FILE_UPLOAD_CLEANUP_JOB_THRESHOLD_MINUTES.getKey(), String.valueOf(INTEGER_VALUE))));
SystemJobRunResponse systemJobRunResponse = new SystemJobRunResponse(FileUploadCleanupJob.JOB_NAME, Arrays.asList(new Parameter(ConfigurationValue.FILE_UPLOAD_CLEANUP_JOB_THRESHOLD_MINUTES.getKey(), String.valueOf(INTEGER_VALUE))));
when(systemJobService.runSystemJob(systemJobRunRequest)).thenReturn(systemJobRunResponse);
// Request to run the system job.
SystemJobRunResponse resultSystemJobRunResponse = systemJobRestController.runSystemJob(systemJobRunRequest);
// Verify the external calls.
verify(systemJobService).runSystemJob(systemJobRunRequest);
verifyNoMoreInteractions(systemJobService);
// Validate the returned object.
assertEquals(systemJobRunResponse, resultSystemJobRunResponse);
}
Aggregations