Browse Source

Disable auto-detection in tests that start Hazelcast

This commit updates test configurations to disable auto-detection of
Hazelcast instances.

See gh-31863
pull/31958/head
Adrian Bob 3 years ago committed by Stephane Nicoll
parent
commit
aad9c8906a
  1. 1
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/hazelcast.xml
  2. 1
      spring-boot-project/spring-boot-actuator/src/test/resources/hazelcast.xml
  3. 2
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastAutoConfigurationServerTests.java
  4. 1
      spring-boot-project/spring-boot-autoconfigure/src/test/resources/hazelcast.xml
  5. 2
      spring-boot-project/spring-boot-autoconfigure/src/test/resources/hazelcast.yaml
  6. 1
      spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml
  7. 2
      spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yaml

1
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/resources/hazelcast.xml

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

1
spring-boot-project/spring-boot-actuator/src/test/resources/hazelcast.xml

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

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

@ -131,6 +131,7 @@ class HazelcastAutoConfigurationServerTests { @@ -131,6 +131,7 @@ class HazelcastAutoConfigurationServerTests {
@Test
void configInstanceWithName() {
Config config = new Config("my-test-instance");
config.getNetworkConfig().getJoin().getAutoDetectionConfig().setEnabled(false);
HazelcastInstance existing = Hazelcast.newHazelcastInstance(config);
try {
this.contextRunner.withUserConfiguration(HazelcastConfigWithName.class)
@ -180,6 +181,7 @@ class HazelcastAutoConfigurationServerTests { @@ -180,6 +181,7 @@ class HazelcastAutoConfigurationServerTests {
@Bean
Config anotherHazelcastConfig() {
Config config = new Config();
config.getNetworkConfig().getJoin().getAutoDetectionConfig().setEnabled(false);
config.addQueueConfig(new QueueConfig("another-queue"));
return config;
}

1
spring-boot-project/spring-boot-autoconfigure/src/test/resources/hazelcast.xml

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

2
spring-boot-project/spring-boot-autoconfigure/src/test/resources/hazelcast.yaml

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

1
spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml

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

2
spring-boot-project/spring-boot-autoconfigure/src/test/resources/org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.yaml

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
hazelcast:
network:
join:
auto-detection:
enabled: false
multicast:
enabled: false

Loading…
Cancel
Save