@Test public void testFindLastSchedulingResult() throws Exception { when(serviceMock.findLastSchedulingResult("taskAbc")).thenReturn(Mono.just(EVENT)); SchedulingResultEvent entity = SpringMockMvcUtil.doGet(mockMvc, "/api/v3/scheduler/results/taskAbc", SchedulingResultEvent.class); assertThat(entity).isEqualTo(EVENT); }
@GetMapping(path = "/results/{id}") @ApiOperation("Find scheduling result for a task") public SchedulingResultEvent findLastSchedulingResult(@PathVariable("id") String taskId) { return Responses.fromMono(schedulerService.findLastSchedulingResult(taskId)); }
FederationSchedulerSpringResource { @GetMapping(path = "/results/{id}") @ApiOperation("Find scheduling result for a task") public SchedulingResultEvent findLastSchedulingResult(@PathVariable("id") String taskId) { return Responses.fromMono(schedulerService.findLastSchedulingResult(taskId)); } }
FederationSchedulerSpringResource { @GetMapping(path = "/results/{id}") @ApiOperation("Find scheduling result for a task") public SchedulingResultEvent findLastSchedulingResult(@PathVariable("id") String taskId) { return Responses.fromMono(schedulerService.findLastSchedulingResult(taskId)); } @Inject  FederationSchedulerSpringResource(AggregatingSchedulerService schedulerService); }
FederationSchedulerSpringResource { @GetMapping(path = "/results/{id}") @ApiOperation("Find scheduling result for a task") public SchedulingResultEvent findLastSchedulingResult(@PathVariable("id") String taskId) { return Responses.fromMono(schedulerService.findLastSchedulingResult(taskId)); } @Inject  FederationSchedulerSpringResource(AggregatingSchedulerService schedulerService); @GetMapping(path = "/results/{id}") @ApiOperation("Find scheduling result for a task") SchedulingResultEvent findLastSchedulingResult(@PathVariable("id") String taskId); }
FederationSchedulerSpringResource { @GetMapping(path = "/results/{id}") @ApiOperation("Find scheduling result for a task") public SchedulingResultEvent findLastSchedulingResult(@PathVariable("id") String taskId) { return Responses.fromMono(schedulerService.findLastSchedulingResult(taskId)); } @Inject  FederationSchedulerSpringResource(AggregatingSchedulerService schedulerService); @GetMapping(path = "/results/{id}") @ApiOperation("Find scheduling result for a task") SchedulingResultEvent findLastSchedulingResult(@PathVariable("id") String taskId);  }