use of org.apache.flink.runtime.dispatcher.UnknownOperationKeyException in project flink by apache.
the class SavepointHandlersTest method testQueryStatusOfUnknownOperationReturnsError.
@Test
public void testQueryStatusOfUnknownOperationReturnsError() throws HandlerRequestException, RestHandlerException {
final TestingRestfulGateway testingRestfulGateway = new TestingRestfulGateway.Builder().setGetSavepointStatusFunction(key -> FutureUtils.completedExceptionally(new UnknownOperationKeyException(key))).build();
final CompletableFuture<AsynchronousOperationResult<SavepointInfo>> statusFuture = savepointStatusHandler.handleRequest(savepointStatusRequest(new TriggerId()), testingRestfulGateway);
assertThat(statusFuture, RestMatchers.respondsWithError(HttpResponseStatus.NOT_FOUND));
}
Aggregations