wangyang0918 commented on a change in pull request #11427: [FLINK-15790][k8s] 
Make FlinkKubeClient and its implementations asynchronous
URL: https://github.com/apache/flink/pull/11427#discussion_r406578227
 
 

 ##########
 File path: 
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesResourceManagerTest.java
 ##########
 @@ -398,4 +421,19 @@ private void terminatePod(Pod pod) {
                                .build())
                        .build());
        }
+
+       private FlinkKubeClient createFlinkKubeClient() {
+               ExecutorService kubeClientExecutorService = 
Executors.newDirectExecutorService();
+               return new Fabric8FlinkKubeClient(flinkConfig, kubeClient, () 
-> kubeClientExecutorService) {
+                       @Override
+                       public CompletableFuture<Void> 
createTaskManagerPod(KubernetesPod kubernetesPod) {
+                               return CompletableFuture.runAsync(
+                                       () -> {
+                                               throw new 
RuntimeException("Exception");
+                                       },
+                                       kubeClientExecutorService
+                               );
 
 Review comment:
   I am not what do you mean here. Since the `createTaskManagerPod` needs to 
return a `CompletableFuture<Void>`.

----------------------------------------------------------------
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