flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #4757: [FLINK-7694][REST][Webfrontend]Port JobMetricsHand...
Date Thu, 02 Nov 2017 17:48:48 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4757#discussion_r148606599
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/legacy/metrics/JobMetricsHandlerTest.java
---
    @@ -65,15 +65,28 @@ public void getMapFor() throws Exception {
     
     		assertEquals("2", metrics.get("abc.metric3"));
     		assertEquals("3", metrics.get("abc.metric4"));
    +		assertEquals(
    +				"[" +
    +						"{\"id\":\"abc.metric4\"}," +
    +						"{\"id\":\"abc.metric3\"}" +
    +						"]",
    +				handler.getAvailableMetricsList(pathParams));
    +		assertEquals("", handler.getMetricsValues(pathParams, ""));
    +		assertEquals(
    +				"[" +
    +						"{\"id\":\"abc.metric3\",\"value\":\"2\"}," +
    +						"{\"id\":\"abc.metric4\",\"value\":\"3\"}" +
    +						"]",
    +				handler.getMetricsValues(pathParams, "abc.metric3,abc.metric4"));
     	}
     
     	@Test
     	public void getMapForNull() {
     		MetricFetcher fetcher = new MetricFetcher(
    -			mock(GatewayRetriever.class),
    -			mock(MetricQueryServiceRetriever.class),
    -			Executors.directExecutor(),
    -			TestingUtils.TIMEOUT());
    +										mock(GatewayRetriever.class),
    +										mock(MetricQueryServiceRetriever.class),
    +										Executors.directExecutor(),
    +										TestingUtils.TIMEOUT());
    --- End diff --
    
    Please revert


---

Mime
View raw message