Skip to content

Commit 6351501

Browse files
committed
Merge branch '3.2.x'
Closes gh-40850
2 parents 88917b5 + 823cc90 commit 6351501

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationClientTests.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@
2828
import com.hazelcast.client.config.ClientConfig;
2929
import com.hazelcast.client.impl.clientside.HazelcastClientProxy;
3030
import com.hazelcast.config.Config;
31+
import com.hazelcast.config.NetworkConfig;
3132
import com.hazelcast.core.Hazelcast;
3233
import com.hazelcast.core.HazelcastInstance;
3334
import org.assertj.core.api.Condition;
@@ -64,7 +65,9 @@ class HazelcastAutoConfigurationClientTests {
6465
@BeforeAll
6566
static void init() {
6667
Config config = Config.load();
67-
config.getNetworkConfig().setPort(0);
68+
NetworkConfig networkConfig = config.getNetworkConfig();
69+
networkConfig.setPort(0);
70+
networkConfig.setPublicAddress("localhost");
6871
hazelcastServer = Hazelcast.newHazelcastInstance(config);
6972
InetSocketAddress inetSocketAddress = (InetSocketAddress) hazelcastServer.getLocalEndpoint().getSocketAddress();
7073
endpointAddress = inetSocketAddress.getHostString() + ":" + inetSocketAddress.getPort();

0 commit comments

Comments
 (0)