Skip to content

Commit 584998b

Browse files
committed
Build: Use local host IP address in topics recovery tests
(merge main -> ce/main 107851) [git-p4: depot-paths = "//dev/coherence-ce/main/": change = 107852]
1 parent f4314ae commit 584998b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

prj/test/functional/topics/src/main/java/topics/TopicsRecoveryTests.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import com.tangosol.net.Coherence;
4141
import com.tangosol.net.CoherenceConfiguration;
4242
import com.tangosol.net.DistributedCacheService;
43+
import com.tangosol.net.InetAddressHelper;
4344
import com.tangosol.net.PagedTopicService;
4445
import com.tangosol.net.Service;
4546
import com.tangosol.net.Session;
@@ -68,6 +69,7 @@
6869
import java.io.DataOutput;
6970
import java.io.IOException;
7071

72+
import java.net.InetAddress;
7173
import java.util.HashSet;
7274
import java.util.Set;
7375
import java.util.concurrent.CompletableFuture;
@@ -89,11 +91,14 @@ public class TopicsRecoveryTests
8991
@BeforeClass
9092
public static void setup() throws Exception
9193
{
94+
InetAddress localHost = InetAddressHelper.getLocalHost();
9295
System.setProperty(Logging.PROPERTY_LEVEL, "8");
9396
System.setProperty(CacheConfig.PROPERTY, CACHE_CONFIG);
9497
System.setProperty(LocalStorage.PROPERTY, "false");
95-
System.setProperty("coherence.wka", "127.0.0.1");
96-
System.setProperty("coherence.localhost", "127.0.0.1");
98+
System.setProperty("coherence.wka", localHost.getHostAddress());
99+
System.setProperty("coherence.localhost", localHost.getHostAddress());
100+
System.setProperty("test.unicast.address", localHost.getHostAddress());
101+
System.setProperty("test.unicast.port", "0");
97102
System.setProperty("coherence.ttl", "0");
98103
}
99104

0 commit comments

Comments
 (0)