TisonKun commented on a change in pull request #10074: [FLINK-14499][Runtime / 
Metrics]MetricRegistry#getMetricQueryServiceGatewayRpcAddress is Nonnull
URL: https://github.com/apache/flink/pull/10074#discussion_r343416181
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherResourceCleanupTest.java
 ##########
 @@ -193,6 +196,11 @@ private void startDispatcher(JobManagerRunnerFactory 
jobManagerRunnerFactory) th
                TestingResourceManagerGateway resourceManagerGateway = new 
TestingResourceManagerGateway();
                final HeartbeatServices heartbeatServices = new 
HeartbeatServices(1000L, 1000L);
                final MemoryArchivedExecutionGraphStore 
archivedExecutionGraphStore = new MemoryArchivedExecutionGraphStore();
+
+               MetricRegistryImpl metricRegistry = new 
MetricRegistryImpl(MetricRegistryConfiguration.defaultMetricRegistryConfiguration());
+               metricRegistry.startQueryService(new TestingRpcService(), new 
ResourceID("mqs"));
 
 Review comment:
   since you start a `new TestingRpcService()` I don't think this resource 
would be properly release.

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