ysymi commented on code in PR #790:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/790#discussion_r1517409537


##########
flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/FlinkOperatorTest.java:
##########
@@ -70,10 +70,21 @@ public void testConfigurationPassedToJOSDK() {
 
         var configService = 
testOperator.getOperator().getConfigurationService();
 
-        // Test parallelism being passed
+        // Test parallelism being passed expectedly
         var executorService = configService.getExecutorService();
         Assertions.assertInstanceOf(ThreadPoolExecutor.class, executorService);
         ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) 
executorService;
+        for (int i = 0; i < testParallelism * 2; i++) {
+            threadPoolExecutor.execute(
+                    () -> {
+                        try {
+                            Thread.sleep(1000);
+                        } catch (InterruptedException e) {
+                            e.printStackTrace();
+                        }
+                    });
+        }

Review Comment:
   do you mean "increase counter and sleep for long in every task" ? if yes,  
"Assert the counter == 2x parallelism" will always fail even if we set a fixed 
thread pool(what we want to change) 
   I think check pool size (which equals really thread number)is functional 
enough. 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to