use of org.apache.flink.runtime.webmonitor.retriever.GatewayRetriever in project flink by apache.
the class AbstractMetricsHandlerTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
final MetricStore metricStore = new MetricStore();
metricStore.add(new MetricDump.CounterDump(new QueryScopeInfo.JobManagerQueryScopeInfo(), TEST_METRIC_NAME, TEST_METRIC_VALUE));
when(mockMetricFetcher.getMetricStore()).thenReturn(metricStore);
testMetricsHandler = new TestMetricsHandler(new GatewayRetriever<DispatcherGateway>() {
@Override
public CompletableFuture<DispatcherGateway> getFuture() {
return CompletableFuture.completedFuture(mockDispatcherGateway);
}
}, Time.milliseconds(50), Collections.emptyMap(), new TestMetricsHeaders(), mockMetricFetcher);
}
Aggregations