Skip to content

Commit c7f31ed

Browse files
committed
Stop relying on test resources from another package
Closes gh-44836
1 parent f94418d commit c7f31ed

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ void jCacheCacheWithUnknownProvider() {
428428
@Test
429429
void jCacheCacheWithConfig() {
430430
String cachingProviderFqn = MockCachingProvider.class.getName();
431-
String configLocation = "org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml";
431+
String configLocation = "org/springframework/boot/autoconfigure/cache/hazelcast-specific.xml";
432432
this.contextRunner.withUserConfiguration(JCacheCustomConfiguration.class)
433433
.withPropertyValues("spring.cache.type=jcache", "spring.cache.jcache.provider=" + cachingProviderFqn,
434434
"spring.cache.jcache.config=" + configLocation)
@@ -499,7 +499,7 @@ void hazelcastCacheWithExistingHazelcastInstance() {
499499

500500
@Test
501501
void hazelcastCacheWithHazelcastAutoConfiguration() {
502-
String hazelcastConfig = "org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml";
502+
String hazelcastConfig = "org/springframework/boot/autoconfigure/cache/hazelcast-specific.xml";
503503
this.contextRunner.withConfiguration(AutoConfigurations.of(HazelcastAutoConfiguration.class))
504504
.withUserConfiguration(DefaultCacheConfiguration.class)
505505
.withPropertyValues("spring.cache.type=hazelcast", "spring.hazelcast.config=" + hazelcastConfig)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-5.0.xsd"
2+
xmlns="http://www.hazelcast.com/schema/config"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
5+
<queue name="foobar"/>
6+
7+
<map name="foobar">
8+
<time-to-live-seconds>3600</time-to-live-seconds>
9+
<max-idle-seconds>600</max-idle-seconds>
10+
</map>
11+
12+
<network>
13+
<join>
14+
<auto-detection enabled="false" />
15+
<multicast enabled="false"/>
16+
</join>
17+
</network>
18+
19+
</hazelcast>

0 commit comments

Comments
 (0)