eolivelli commented on a change in pull request #1682:
URL: https://github.com/apache/zookeeper/pull/1682#discussion_r651477438
##########
File path:
zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/test/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProviderTest.java
##########
@@ -57,7 +62,7 @@ public void setup() throws Exception {
provider = new PrometheusMetricsProvider();
Properties configuration = new Properties();
configuration.setProperty("httpHost", "127.0.0.1"); // local host for
test
- configuration.setProperty("httpPort", "0"); // ephemeral port
+ configuration.setProperty("httpPort", String.valueOf(METRICS_PORT));
Review comment:
it is better to have an ephemeral port,
otherwise it is easy to break the execution of the test on an env in which
port 7000 is already bound and also it prevents running concurrent tests
--
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:
[email protected]