You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2018/02/20 15:46:50 UTC

[2/4] flink git commit: [FLINK-8621][prometheus][tests] Remove endpointIsUnavailableAfterReporterIsClosed()

[FLINK-8621][prometheus][tests] Remove endpointIsUnavailableAfterReporterIsClosed()

The test is inherently unstable as it will always fail if any other
server is started on the port between the closing of the reporter and
the polling of metrics.

This closes #5473.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/6c9a5c7f
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/6c9a5c7f
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/6c9a5c7f

Branch: refs/heads/master
Commit: 6c9a5c7f3c63404657fc1da633bc22b62c1c1178
Parents: 8672331
Author: zentol <ch...@apache.org>
Authored: Tue Feb 13 10:31:31 2018 +0100
Committer: zentol <ch...@apache.org>
Committed: Tue Feb 20 16:45:38 2018 +0100

----------------------------------------------------------------------
 .../flink/metrics/prometheus/PrometheusReporterTest.java    | 9 ---------
 1 file changed, 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/6c9a5c7f/flink-metrics/flink-metrics-prometheus/src/test/java/org/apache/flink/metrics/prometheus/PrometheusReporterTest.java
----------------------------------------------------------------------
diff --git a/flink-metrics/flink-metrics-prometheus/src/test/java/org/apache/flink/metrics/prometheus/PrometheusReporterTest.java b/flink-metrics/flink-metrics-prometheus/src/test/java/org/apache/flink/metrics/prometheus/PrometheusReporterTest.java
index 39cf4be..a149900 100644
--- a/flink-metrics/flink-metrics-prometheus/src/test/java/org/apache/flink/metrics/prometheus/PrometheusReporterTest.java
+++ b/flink-metrics/flink-metrics-prometheus/src/test/java/org/apache/flink/metrics/prometheus/PrometheusReporterTest.java
@@ -156,15 +156,6 @@ public class PrometheusReporterTest extends TestLogger {
 	}
 
 	@Test
-	public void endpointIsUnavailableAfterReporterIsClosed() throws UnirestException {
-		MetricRegistryImpl registry = new MetricRegistryImpl(MetricRegistryConfiguration.fromConfiguration(createConfigWithOneReporter("test1", "9400-9500")));
-		PrometheusReporter reporter = (PrometheusReporter) registry.getReporters().get(0);
-		reporter.close();
-		thrown.expect(UnirestException.class);
-		pollMetrics(reporter.getPort());
-	}
-
-	@Test
 	public void invalidCharactersAreReplacedWithUnderscore() {
 		assertThat(PrometheusReporter.replaceInvalidChars(""), equalTo(""));
 		assertThat(PrometheusReporter.replaceInvalidChars("abc"), equalTo("abc"));