TisonKun commented on a change in pull request #10251: 
[FLINK-14851][FLINK-14850] Implement Executors and wire them to the 
ContextEnvironment
URL: https://github.com/apache/flink/pull/10251#discussion_r347909845
 
 

 ##########
 File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/environment/ExecutorDiscoveryAndJobClientTest.java
 ##########
 @@ -69,19 +88,39 @@ private JobExecutionResult 
executeTestJobBasedOnConfig(final Configuration confi
         */
        public static class IDReportingExecutorFactory implements 
ExecutorFactory {
 
-               public static final String ID = "test-executor-A";
-
                @Override
                public boolean isCompatibleWith(@Nonnull Configuration 
configuration) {
-                       return 
ID.equals(configuration.get(DeploymentOptions.TARGET));
+                       return 
EXEC_NAME.equals(configuration.get(DeploymentOptions.TARGET));
                }
 
                @Override
                public Executor getExecutor(@Nonnull Configuration 
configuration) {
                        return (pipeline, executionConfig) -> {
                                final Map<String, OptionalFailure<Object>> res 
= new HashMap<>();
-                               res.put(DeploymentOptions.TARGET.key(), 
OptionalFailure.of(ID));
-                               return new JobExecutionResult(new JobID(), 12L, 
res);
+                               res.put(DeploymentOptions.TARGET.key(), 
OptionalFailure.of(EXEC_NAME));
+
+                               return CompletableFuture.completedFuture(new 
JobClient(){
 
 Review comment:
   Here is another instance which we can replace with a single subclass 
`TestingJobClient`.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to