danzhewuju commented on code in PR #29460:
URL: https://github.com/apache/flink/pull/29460#discussion_r4255141364
##########
flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/rescales/JobRescaleDetailsHandlerTest.java:
##########
@@ -160,6 +163,80 @@ void testRequestNormalJobRescaleStatisticsDetails()
assertThat(jobRescaleDetails).isEqualTo(fromRescale(rescale, true));
}
+ @Test
+ void testRequestLatestRescaleEvictedFromHistory()
+ throws HandlerRequestException, RestHandlerException {
+ final Rescale latestIgnoredRescale =
+
createTerminatedRescale(TerminatedReason.RESOURCE_REQUIREMENTS_UPDATED);
+ final Rescale retainedCompletedRescale =
+ createTerminatedRescale(TerminatedReason.SUCCEEDED);
+ final ExecutionGraphInfo executionGraphInfo =
+ createExecutionGraphInfo(latestIgnoredRescale,
retainedCompletedRescale);
+ final HandlerRequest<EmptyRequestBody> request =
+ createRequest(
+ executionGraphInfo.getJobId(),
+
latestIgnoredRescale.getRescaleIdInfo().getRescaleUuid());
+
+ assertThat(testInstance.handleRequest(request, executionGraphInfo))
+ .isEqualTo(fromRescale(latestIgnoredRescale, true));
Review Comment:
Done. I added a request with an unknown UUID and assert that it returns a
RestHandlerException with HTTP 404. The assertion also verifies that the UUID
is included in the error message.
--
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]