diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/hazelcast.xml b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/hazelcast.xml
index 23f6e90e93..566f53e3a1 100644
--- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/hazelcast.xml
+++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/hazelcast.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/spring-boot-project/spring-boot-actuator/src/test/resources/hazelcast.xml b/spring-boot-project/spring-boot-actuator/src/test/resources/hazelcast.xml
index ee10fee2ca..d01639965c 100644
--- a/spring-boot-project/spring-boot-actuator/src/test/resources/hazelcast.xml
+++ b/spring-boot-project/spring-boot-actuator/src/test/resources/hazelcast.xml
@@ -6,7 +6,7 @@
-
+
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java
index a6ea4451b1..3909ba7029 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java
+++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java
@@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.hazelcast;
import java.util.Map;
import com.hazelcast.config.Config;
+import com.hazelcast.config.JoinConfig;
import com.hazelcast.config.QueueConfig;
import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
@@ -138,7 +139,7 @@ class HazelcastAutoConfigurationServerTests {
@Test
void configInstanceWithName() {
- Config config = new Config("my-test-instance");
+ Config config = createTestConfig("my-test-instance");
HazelcastInstance existing = Hazelcast.newHazelcastInstance(config);
try {
this.contextRunner.withUserConfiguration(HazelcastConfigWithName.class)
@@ -205,6 +206,14 @@ class HazelcastAutoConfigurationServerTests {
});
}
+ private static Config createTestConfig(String instanceName) {
+ Config config = new Config(instanceName);
+ JoinConfig join = config.getNetworkConfig().getJoin();
+ join.getAutoDetectionConfig().setEnabled(false);
+ join.getMulticastConfig().setEnabled(false);
+ return config;
+ }
+
@Configuration(proxyBeanMethods = false)
static class HazelcastConfigWithName {
@@ -220,7 +229,7 @@ class HazelcastAutoConfigurationServerTests {
@Bean
Config anotherHazelcastConfig() {
- Config config = new Config();
+ Config config = createTestConfig("another-test-instance");
config.addQueueConfig(new QueueConfig("another-queue"));
return config;
}
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/resources/hazelcast.xml b/spring-boot-project/spring-boot-autoconfigure/src/test/resources/hazelcast.xml
index edf5d0a1f8..cd69939118 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/test/resources/hazelcast.xml
+++ b/spring-boot-project/spring-boot-autoconfigure/src/test/resources/hazelcast.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/resources/hazelcast.yaml b/spring-boot-project/spring-boot-autoconfigure/src/test/resources/hazelcast.yaml
index 1616ba2e78..686d75638a 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/test/resources/hazelcast.yaml
+++ b/spring-boot-project/spring-boot-autoconfigure/src/test/resources/hazelcast.yaml
@@ -1,5 +1,7 @@
hazelcast:
network:
join:
+ auto-detection:
+ enabled: false
multicast:
enabled: false
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml b/spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml
index 419711a7e9..f5a30301dc 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml
+++ b/spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yaml b/spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yaml
index 614e99777a..933c34ffd0 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yaml
+++ b/spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yaml
@@ -1,6 +1,8 @@
hazelcast:
network:
join:
+ auto-detection:
+ enabled: false
multicast:
enabled: false
diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-session-hazelcast/src/main/resources/hazelcast.xml b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-session-hazelcast/src/main/resources/hazelcast.xml
index 8d2a3bd29e..064a1b00b9 100644
--- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-session-hazelcast/src/main/resources/hazelcast.xml
+++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-session-hazelcast/src/main/resources/hazelcast.xml
@@ -1,7 +1,7 @@
+ http://www.hazelcast.com/schema/config/hazelcast-config-4.2.xsd">