use of org.finra.herd.model.api.xml.Parameter in project herd by FINRAOS.
the class SystemJobServiceTest method testRunSystemJobStoragePolicySelectorUpperCaseParameters.
@Test
public void testRunSystemJobStoragePolicySelectorUpperCaseParameters() throws Exception {
// Create a system job run request using upper case input parameters (except for case-sensitive job name).
SystemJobRunRequest systemJobRunRequest = new SystemJobRunRequest(StoragePolicySelectorJob.JOB_NAME, Arrays.asList(new Parameter(ConfigurationValue.STORAGE_POLICY_SELECTOR_JOB_MAX_BDATA_INSTANCES.getKey().toUpperCase(), String.valueOf(INTEGER_VALUE))));
// Request to run the system job.
SystemJobRunResponse resultSystemJobRunResponse = systemJobService.runSystemJob(systemJobRunRequest);
// Validate the returned object.
assertEquals(new SystemJobRunResponse(StoragePolicySelectorJob.JOB_NAME, Arrays.asList(new Parameter(ConfigurationValue.STORAGE_POLICY_SELECTOR_JOB_MAX_BDATA_INSTANCES.getKey().toUpperCase(), String.valueOf(INTEGER_VALUE)))), resultSystemJobRunResponse);
}
use of org.finra.herd.model.api.xml.Parameter in project herd by FINRAOS.
the class SystemJobServiceTest method testRunSystemJobBusinessObjectDataFinalizeRestoreLowerCaseParameters.
@Test
public void testRunSystemJobBusinessObjectDataFinalizeRestoreLowerCaseParameters() throws Exception {
// Create a system job run request using lower case input parameters (except for case-sensitive job name).
SystemJobRunRequest systemJobRunRequest = new SystemJobRunRequest(BusinessObjectDataFinalizeRestoreJob.JOB_NAME, Arrays.asList(new Parameter(ConfigurationValue.BDATA_FINALIZE_RESTORE_JOB_MAX_BDATA_INSTANCES.getKey().toLowerCase(), 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().toLowerCase(), String.valueOf(INTEGER_VALUE)))), resultSystemJobRunResponse);
}
use of org.finra.herd.model.api.xml.Parameter 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.Parameter 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.Parameter in project herd by FINRAOS.
the class JobServiceTestHelper method createJobCreateRequest.
/**
* Creates job create request using a specified namespace code and job name, but test hard coded parameters will be used.
*
* @param namespaceCd the namespace code.
* @param jobName the job definition name.
*
* @return the created job create request.
*/
public JobCreateRequest createJobCreateRequest(String namespaceCd, String jobName) {
// Create a test list of parameters.
List<Parameter> parameters = new ArrayList<>();
Parameter parameter = new Parameter(AbstractServiceTest.ATTRIBUTE_NAME_2_MIXED_CASE, AbstractServiceTest.ATTRIBUTE_VALUE_2);
parameters.add(parameter);
parameter = new Parameter("Extra Attribute With No Value", null);
parameters.add(parameter);
return createJobCreateRequest(namespaceCd, jobName, parameters);
}
Aggregations