This is an automated email from the ASF dual-hosted git repository. wirebaron pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push: new c73896a GEODE-5467: Remove chance of use same random port for JMX and http se… (#2199) c73896a is described below commit c73896a8a1b10b76373737cb235fc6643663410d Author: Brian Rowe <br...@pivotal.io> AuthorDate: Thu Jul 26 14:51:54 2018 -0700 GEODE-5467: Remove chance of use same random port for JMX and http se… (#2199) --- .../java/org/apache/geode/test/junit/rules/MemberStarterRule.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/geode-core/src/integrationTest/java/org/apache/geode/test/junit/rules/MemberStarterRule.java b/geode-core/src/integrationTest/java/org/apache/geode/test/junit/rules/MemberStarterRule.java index ac192b1..11b4904 100644 --- a/geode-core/src/integrationTest/java/org/apache/geode/test/junit/rules/MemberStarterRule.java +++ b/geode-core/src/integrationTest/java/org/apache/geode/test/junit/rules/MemberStarterRule.java @@ -212,11 +212,10 @@ public abstract class MemberStarterRule<T> extends SerializableExternalResource */ public T withJMXManager(boolean useProductDefaultPorts) { if (!useProductDefaultPorts) { + int[] randomPorts = AvailablePortHelper.getRandomAvailableTCPPorts(2); // do no override these properties if already exists - properties.putIfAbsent(JMX_MANAGER_PORT, - AvailablePortHelper.getRandomAvailableTCPPort() + ""); - properties.putIfAbsent(HTTP_SERVICE_PORT, - AvailablePortHelper.getRandomAvailableTCPPort() + ""); + properties.putIfAbsent(JMX_MANAGER_PORT, randomPorts[0] + ""); + properties.putIfAbsent(HTTP_SERVICE_PORT, randomPorts[1] + ""); this.jmxPort = Integer.parseInt(properties.getProperty(JMX_MANAGER_PORT)); this.httpPort = Integer.parseInt(properties.getProperty(HTTP_SERVICE_PORT)); } else {