Skip to content

Commit aad9c89

Browse files
adrianbobsnicoll
authored andcommitted
Disable auto-detection in tests that start Hazelcast
This commit updates test configurations to disable auto-detection of Hazelcast instances. See gh-31863
1 parent 782e3f7 commit aad9c89

File tree

7 files changed

+10
-0
lines changed

7 files changed

+10
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<map name="defaultCache" />
66
<network>
77
<join>
8+
<auto-detection enabled="false"/>
89
<multicast enabled="false"/>
910
</join>
1011
</network>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<map name="defaultCache" />
77
<network>
88
<join>
9+
<auto-detection enabled="false" />
910
<multicast enabled="false"/>
1011
</join>
1112
</network>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ void unknownConfigFile() {
131131
@Test
132132
void configInstanceWithName() {
133133
Config config = new Config("my-test-instance");
134+
config.getNetworkConfig().getJoin().getAutoDetectionConfig().setEnabled(false);
134135
HazelcastInstance existing = Hazelcast.newHazelcastInstance(config);
135136
try {
136137
this.contextRunner.withUserConfiguration(HazelcastConfigWithName.class)
@@ -180,6 +181,7 @@ static class HazelcastConfigNoName {
180181
@Bean
181182
Config anotherHazelcastConfig() {
182183
Config config = new Config();
184+
config.getNetworkConfig().getJoin().getAutoDetectionConfig().setEnabled(false);
183185
config.addQueueConfig(new QueueConfig("another-queue"));
184186
return config;
185187
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<map name="defaultCache" />
66
<network>
77
<join>
8+
<auto-detection enabled="false" />
89
<multicast enabled="false" />
910
</join>
1011
</network>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
hazelcast:
22
network:
33
join:
4+
auto-detection:
5+
enabled: false
46
multicast:
57
enabled: false

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
<network>
1313
<join>
14+
<auto-detection enabled="false" />
1415
<multicast enabled="false"/>
1516
</join>
1617
</network>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
hazelcast:
22
network:
33
join:
4+
auto-detection:
5+
enabled: false
46
multicast:
57
enabled: false
68

0 commit comments

Comments
 (0)