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

 ##########
 File path: 
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesResourceManagerTest.java
 ##########
 @@ -323,6 +330,18 @@ public void testGetCpuCoresNumSlots() {
                assertThat(resourceManager.getCpuCores(configuration), is(3.0));
        }
 
+       @Test
+       public void testCreateTaskManagerPodFailedAndRetry() throws Exception {
+               flinkKubeClient = spy(createFlinkKubeClient());
 
 Review comment:
   According to Flink code style, we avoid using mockito mocks.
   We usually create proper testing implementations of classes.
   E.g. in this case, we could have:
   ```
   private static FlinkKubeClient 
createTestingFlinkKubeClientAllocatingPodsAfter(
       int numberOfRetries,
       AtomicInteger retries) { ... }
   ```
   which fails and increments `retries` until it reaches `numberOfRetries` and 
succeeds.

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