Merge branch '2.6.x' into 2.7.x

Closes gh-31883
pull/32861/head
Stephane Nicoll 2 years ago
commit 53a652ec65

@ -5,7 +5,7 @@
<map name="defaultCache" />
<network>
<join>
<tcp-ip enabled="false"/>
<auto-detection enabled="false"/>
<multicast enabled="false"/>
</join>
</network>

@ -6,7 +6,7 @@
<map name="defaultCache" />
<network>
<join>
<tcp-ip enabled="false"/>
<auto-detection enabled="false"/>
<multicast enabled="false"/>
</join>
</network>

@ -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;
}

@ -5,7 +5,7 @@
<map name="defaultCache" />
<network>
<join>
<tcp-ip enabled="false" />
<auto-detection enabled="false" />
<multicast enabled="false" />
</join>
</network>

@ -1,5 +1,7 @@
hazelcast:
network:
join:
auto-detection:
enabled: false
multicast:
enabled: false

@ -11,7 +11,7 @@
<network>
<join>
<tcp-ip enabled="false"/>
<auto-detection enabled="false" />
<multicast enabled="false"/>
</join>
</network>

@ -14,7 +14,6 @@
<network>
<join>
<tcp-ip enabled="false"/>
<multicast enabled="false"/>
</join>
</network>

@ -7,8 +7,8 @@ description = "Spring Boot Hazelcast 4 smoke test"
configurations.all {
resolutionStrategy {
force "com.hazelcast:hazelcast:4.0.5"
force "com.hazelcast:hazelcast-spring:4.0.5"
force "com.hazelcast:hazelcast:4.2.5"
force "com.hazelcast:hazelcast-spring:4.2.5"
}
}

@ -1,6 +1,6 @@
<hazelcast xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-4.0.xsd">
xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-4.2.xsd">
<map name="countries">
<time-to-live-seconds>600</time-to-live-seconds>
</map>
@ -13,7 +13,7 @@
<network>
<join>
<tcp-ip enabled="false"/>
<auto-detection enabled="false" />
<multicast enabled="false"/>
</join>
</network>

@ -1,7 +1,7 @@
<hazelcast xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config
http://www.hazelcast.com/schema/config/hazelcast-config-4.0.xsd">
http://www.hazelcast.com/schema/config/hazelcast-config-4.2.xsd">
<map name="spring:session:sessions">
<attributes>
@ -11,6 +11,7 @@
<network>
<join>
<auto-detection enabled="false"/>
<multicast enabled="false"/>
</join>
</network>

Loading…
Cancel
Save