tillrohrmann commented on a change in pull request #16274:
URL: https://github.com/apache/flink/pull/16274#discussion_r670603303



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/minicluster/MiniClusterITCase.java
##########
@@ -686,6 +690,38 @@ public void initializeOnMaster(ClassLoader loader) {
         }
     }
 
+    @Test
+    public void testDefaultSizeOfIOPool() throws Exception {
+
+        final int numOfTMs = 3;
+        final int slotsPerTM = 7;
+
+        final MiniClusterConfiguration cfg =
+                new MiniClusterConfiguration.Builder()
+                        .setNumTaskManagers(numOfTMs)
+                        .setNumSlotsPerTaskManager(slotsPerTM)
+                        .setConfiguration(getDefaultConfiguration())
+                        .build();
+
+        try (final MiniCluster miniCluster = new MiniCluster(cfg)) {
+            miniCluster.start();
+            miniCluster.getDispatcherGatewayFuture().get();
+
+            // check io pool size.
+            List<TaskExecutor> taskManagers = miniCluster.getTaskManagers();
+            for (TaskExecutor taskExecutor : taskManagers) {
+                ThreadPoolExecutor ioExecutor = (ThreadPoolExecutor) 
taskExecutor.getIOExecutor();
+                assertThat(
+                        ioExecutor.getCorePoolSize(),
+                        is(MiniClusterConfiguration.DEFAULT_IO_POOL_SIZE));
+            }
+
+            assertThat(
+                    ((ThreadPoolExecutor) 
miniCluster.getIOExecutor()).getCorePoolSize(),
+                    is(MiniClusterConfiguration.DEFAULT_IO_POOL_SIZE));
+        }
+    }

Review comment:
       I think this test leaks a bit of implementation details (e.g. 
`ioExecutor` being a `ThreadPoolExecutor`). Hence, I would argue that it is ok 
to remove this test.




-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to