You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/08/19 07:56:14 UTC
[GitHub] [flink] zentol commented on a change in pull request #11469: [FLINK-15299][test] Move ClientUtils#submitJob & ClientUtils#submitJobAndWaitForResult to test scope
zentol commented on a change in pull request #11469:
URL: https://github.com/apache/flink/pull/11469#discussion_r472826235
##########
File path: flink-clients/src/test/java/org/apache/flink/client/program/rest/RestClusterClientTest.java
##########
@@ -306,94 +257,6 @@ private TestJobCancellationHandler() {
}
}
- private class TestJobExecutionResultHandler
- extends TestHandler<EmptyRequestBody, JobExecutionResultResponseBody, JobMessageParameters> {
-
- private final Iterator<Object> jobExecutionResults;
-
- private Object lastJobExecutionResult;
-
- private TestJobExecutionResultHandler(
- final Object... jobExecutionResults) {
- super(JobExecutionResultHeaders.getInstance());
- checkArgument(Arrays.stream(jobExecutionResults)
- .allMatch(object -> object instanceof JobExecutionResultResponseBody
- || object instanceof RestHandlerException));
- this.jobExecutionResults = Arrays.asList(jobExecutionResults).iterator();
- }
-
- @Override
- protected CompletableFuture<JobExecutionResultResponseBody> handleRequest(
- @Nonnull HandlerRequest<EmptyRequestBody, JobMessageParameters> request,
- @Nonnull DispatcherGateway gateway) throws RestHandlerException {
- if (jobExecutionResults.hasNext()) {
- lastJobExecutionResult = jobExecutionResults.next();
- }
- checkState(lastJobExecutionResult != null);
- if (lastJobExecutionResult instanceof JobExecutionResultResponseBody) {
- return CompletableFuture.completedFuture((JobExecutionResultResponseBody) lastJobExecutionResult);
- } else if (lastJobExecutionResult instanceof RestHandlerException) {
- return FutureUtils.completedExceptionally((RestHandlerException) lastJobExecutionResult);
- } else {
- throw new AssertionError();
- }
- }
- }
-
- @Test
- public void testSubmitJobAndWaitForExecutionResult() throws Exception {
Review comment:
Why is this test being removed?
##########
File path: flink-clients/src/test/java/org/apache/flink/client/program/rest/RestClusterClientTest.java
##########
@@ -595,35 +458,6 @@ public void testRetriableSendOperationIfConnectionErrorOrServiceUnavailable() th
}
}
- @Test
- public void testJobSubmissionFailureThrowsProgramInvocationException() throws Exception {
Review comment:
Why is this test being removed?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org