This is an automated email from the ASF dual-hosted git repository.
jensdeppe 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 ca18db5 GEODE-6351: Use AvailablePortHelper to retrieve ports (#3150)
ca18db5 is described below
commit ca18db5a59c5d6d9b4aa099af3b1f7fd041ffec9
Author: Jens Deppe <[email protected]>
AuthorDate: Fri Feb 1 14:24:27 2019 -0800
GEODE-6351: Use AvailablePortHelper to retrieve ports (#3150)
---
...NotReprocessedAfterCurrentSiteMemberFailoverWithOldClient.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/geode-wan/src/upgradeTest/java/org/apache/geode/cache/wan/WANRollingUpgradeSecondaryEventsNotReprocessedAfterCurrentSiteMemberFailoverWithOldClient.java
b/geode-wan/src/upgradeTest/java/org/apache/geode/cache/wan/WANRollingUpgradeSecondaryEventsNotReprocessedAfterCurrentSiteMemberFailoverWithOldClient.java
index 68e29d2..20f6c84 100644
---
a/geode-wan/src/upgradeTest/java/org/apache/geode/cache/wan/WANRollingUpgradeSecondaryEventsNotReprocessedAfterCurrentSiteMemberFailoverWithOldClient.java
+++
b/geode-wan/src/upgradeTest/java/org/apache/geode/cache/wan/WANRollingUpgradeSecondaryEventsNotReprocessedAfterCurrentSiteMemberFailoverWithOldClient.java
@@ -20,7 +20,7 @@ import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.apache.geode.distributed.internal.InternalLocator;
-import org.apache.geode.internal.AvailablePort;
+import org.apache.geode.internal.AvailablePortHelper;
import org.apache.geode.test.dunit.DistributedTestUtils;
import org.apache.geode.test.dunit.Host;
import org.apache.geode.test.dunit.NetworkUtils;
@@ -45,15 +45,17 @@ public class
WANRollingUpgradeSecondaryEventsNotReprocessedAfterCurrentSiteMembe
VM site2Server1 = host.getVM(VersionManager.CURRENT_VERSION, 5);
VM site2Server2 = host.getVM(VersionManager.CURRENT_VERSION, 6);
+ int[] locatorPorts = AvailablePortHelper.getRandomAvailableTCPPorts(2);
+
// Get old site locator properties
String hostName = NetworkUtils.getServerHostName(host);
- final int site1LocatorPort =
AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+ final int site1LocatorPort = locatorPorts[0];
DistributedTestUtils.deleteLocatorStateFile(site1LocatorPort);
final String site1Locators = hostName + "[" + site1LocatorPort + "]";
final int site1DistributedSystemId = 0;
// Get current site locator properties
- final int site2LocatorPort =
AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+ final int site2LocatorPort = locatorPorts[1];
DistributedTestUtils.deleteLocatorStateFile(site2LocatorPort);
final String site2Locators = hostName + "[" + site2LocatorPort + "]";
final int site2DistributedSystemId = 1;