You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/05/02 13:50:39 UTC

[GitHub] [flink] tillrohrmann commented on a change in pull request #8307: [FLINK-12359][metrics][tests] Harden SystemResourcesMetricsITCase

tillrohrmann commented on a change in pull request #8307: [FLINK-12359][metrics][tests] Harden SystemResourcesMetricsITCase
URL: https://github.com/apache/flink/pull/8307#discussion_r280423898
 
 

 ##########
 File path: flink-tests/src/test/java/org/apache/flink/runtime/metrics/SystemResourcesMetricsITCase.java
 ##########
 @@ -136,8 +126,17 @@ public void close() {
 			OPENED_REPORTERS.remove(this);
 		}
 
-		public Map<Gauge<?>, String> getGauges() {
-			return gauges;
+		@Override
+		public void notifyOfAddedMetric(Metric metric, String metricName, MetricGroup group) {
+			for (final String expectedPattern : patternFutures.keySet()) {
+				if (group.getMetricIdentifier(metricName, name -> name).matches(expectedPattern)) {
 
 Review comment:
   I think we could move `group.getMetricIdentifier()` outside of the loop

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services