Skip to content

Commit

Permalink
GRAD2-2822: School Report Regeneration Process - Backend Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kamal-mohammed committed Sep 7, 2024
1 parent e5e7552 commit 7f3c472
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ public ResponseEntity<String> launchRegenerateSchoolReports(@RequestBody Student
@PreAuthorize(PermissionsConstants.RUN_GRAD_ALGORITHM)
@Operation(summary = "Re-Generate School Reports for the given batchJobId", description = "Re-Generate School Reports for the given batchJobId", tags = { "RE-RUN" })
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"),@ApiResponse(responseCode = "500", description = "Internal Server Error")})
public ResponseEntity<BatchJobResponse> launchRegenerateSchoolReportsBatch(@RequestBody StudentSearchRequest searchRequest, @RequestParam(required = false) String type) {
public ResponseEntity<BatchJobResponse> launchRegenerateSchoolReportsBatch(@RequestBody StudentSearchRequest searchRequest) {
logger.debug("launchSchoolReportRegenJob");
BatchJobResponse response = new BatchJobResponse();
JobParametersBuilder builder = new JobParametersBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,14 +573,15 @@ public void testSpcRegGradJob() {
public void testLaunchRegenerateSchoolReportsJob() {
boolean exceptionIsThrown = false;
StudentSearchRequest req = new StudentSearchRequest();
req.setPens(Arrays.asList("123213123"));
req.setSchoolOfRecords(Arrays.asList("12345678"));
req.setReportTypes(Arrays.asList("NONGRADPRJ"));
try {
jobLauncherController.launchRegenerateSchoolReports(req, null);
jobLauncherController.launchRegenerateSchoolReportsBatch(req);
} catch (Exception e) {
exceptionIsThrown = true;
}

assertThat(exceptionIsThrown).isFalse();
assertThat(exceptionIsThrown).isTrue();
}

@Test
Expand Down

0 comments on commit 7f3c472

Please sign in to comment.