azagrebin commented on a change in pull request #8191: [FLINK-12213][network]
Pass TaskManagerMetricGroup into constructor of NetworkEnvironment
URL: https://github.com/apache/flink/pull/8191#discussion_r276585909
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/state/TaskExecutorLocalStateStoresManagerTest.java
##########
@@ -105,21 +96,11 @@ public void testCreationFromConfigDefault() throws
Exception {
final Configuration config = new Configuration();
- final ResourceID tmResourceID = ResourceID.generate();
-
- TaskManagerServicesConfiguration
taskManagerServicesConfiguration =
-
TaskManagerServicesConfiguration.fromConfiguration(config, MEM_SIZE_PARAM,
InetAddress.getLocalHost(), true);
-
- TaskManagerServices taskManagerServices =
TaskManagerServices.fromConfiguration(
- taskManagerServicesConfiguration,
- tmResourceID,
- Executors.directExecutor(),
- MEM_SIZE_PARAM,
- MEM_SIZE_PARAM);
+ TaskManagerServices taskManagerServices =
createTaskManagerServices(config);
TaskExecutorLocalStateStoresManager taskStateManager =
taskManagerServices.getTaskManagerStateStore();
- String[] tmpDirPaths =
taskManagerServicesConfiguration.getTmpDirPaths();
+ String[] tmpDirPaths =
ConfigurationUtils.parseTempDirectories(config);
Review comment:
True, I have a little concern that we recreate it with a fixed. If the way
of creation in `TaskManagerServicesConfiguration.fromConfiguration`, it can
diverge with the test. Maybe break down `createTaskManagerServices(config)`
into `createTaskManagerServicesConfiguration(config)`,
`createTaskManagerServices(taskManagerServicesConfiguration)` and in this case?
----------------------------------------------------------------
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