use of org.apache.flink.runtime.metrics.dump.MetricQueryService in project flink by apache.
the class MetricRegistryImplTest method testQueryActorShutdown.
/**
* Tests that the query actor will be stopped when the MetricRegistry is shut down.
*/
@Test
public void testQueryActorShutdown() throws Exception {
final Duration timeout = Duration.ofSeconds(10L);
MetricRegistryImpl registry = new MetricRegistryImpl(MetricRegistryTestUtils.defaultMetricRegistryConfiguration());
final RpcService rpcService = new TestingRpcService();
registry.startQueryService(rpcService, null);
MetricQueryService queryService = checkNotNull(registry.getQueryService());
registry.shutdown().get();
queryService.getTerminationFuture().get(timeout.toMillis(), TimeUnit.MILLISECONDS);
}
Aggregations