Skip to content

Commit 6fd1f0f

Browse files
committed
Avoid using JRE.OTHER for Infinispan tests
See gh-41909
1 parent d627a5d commit 6fd1f0f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import org.infinispan.jcache.embedded.JCachingProvider;
3939
import org.infinispan.spring.embedded.provider.SpringEmbeddedCacheManager;
4040
import org.junit.jupiter.api.Test;
41-
import org.junit.jupiter.api.condition.DisabledOnJre;
41+
import org.junit.jupiter.api.condition.EnabledForJreRange;
4242
import org.junit.jupiter.api.condition.JRE;
4343

4444
import org.springframework.beans.factory.BeanCreationException;
@@ -569,7 +569,7 @@ void hazelcastAsJCacheWithExistingHazelcastInstance() {
569569
}
570570

571571
@Test
572-
@DisabledOnJre(value = JRE.OTHER, disabledReason = "Infinispan 14 does not work on Java 23")
572+
@EnabledForJreRange(min = JRE.JAVA_17, max = JRE.JAVA_22, disabledReason = "Infinispan 14 does not work on Java 23")
573573
void infinispanCacheWithConfig() {
574574
this.contextRunner.withUserConfiguration(DefaultCacheConfiguration.class)
575575
.withPropertyValues("spring.cache.type=infinispan", "spring.cache.infinispan.config=infinispan.xml")
@@ -580,15 +580,15 @@ void infinispanCacheWithConfig() {
580580
}
581581

582582
@Test
583-
@DisabledOnJre(value = JRE.OTHER, disabledReason = "Infinispan 14 does not work on Java 23")
583+
@EnabledForJreRange(min = JRE.JAVA_17, max = JRE.JAVA_22, disabledReason = "Infinispan 14 does not work on Java 23")
584584
void infinispanCacheWithCustomizers() {
585585
this.contextRunner.withUserConfiguration(DefaultCacheAndCustomizersConfiguration.class)
586586
.withPropertyValues("spring.cache.type=infinispan")
587587
.run(verifyCustomizers("allCacheManagerCustomizer", "infinispanCacheManagerCustomizer"));
588588
}
589589

590590
@Test
591-
@DisabledOnJre(value = JRE.OTHER, disabledReason = "Infinispan 14 does not work on Java 23")
591+
@EnabledForJreRange(min = JRE.JAVA_17, max = JRE.JAVA_22, disabledReason = "Infinispan 14 does not work on Java 23")
592592
void infinispanCacheWithCaches() {
593593
this.contextRunner.withUserConfiguration(DefaultCacheConfiguration.class)
594594
.withPropertyValues("spring.cache.type=infinispan", "spring.cache.cacheNames[0]=foo",
@@ -598,7 +598,7 @@ void infinispanCacheWithCaches() {
598598
}
599599

600600
@Test
601-
@DisabledOnJre(value = JRE.OTHER, disabledReason = "Infinispan 14 does not work on Java 23")
601+
@EnabledForJreRange(min = JRE.JAVA_17, max = JRE.JAVA_22, disabledReason = "Infinispan 14 does not work on Java 23")
602602
void infinispanCacheWithCachesAndCustomConfig() {
603603
this.contextRunner.withUserConfiguration(InfinispanCustomConfiguration.class)
604604
.withPropertyValues("spring.cache.type=infinispan", "spring.cache.cacheNames[0]=foo",
@@ -611,7 +611,7 @@ void infinispanCacheWithCachesAndCustomConfig() {
611611
}
612612

613613
@Test
614-
@DisabledOnJre(value = JRE.OTHER, disabledReason = "Infinispan 14 does not work on Java 23")
614+
@EnabledForJreRange(min = JRE.JAVA_17, max = JRE.JAVA_22, disabledReason = "Infinispan 14 does not work on Java 23")
615615
void infinispanAsJCacheWithCaches() {
616616
String cachingProviderClassName = JCachingProvider.class.getName();
617617
this.contextRunner.withUserConfiguration(DefaultCacheConfiguration.class)
@@ -622,7 +622,7 @@ void infinispanAsJCacheWithCaches() {
622622
}
623623

624624
@Test
625-
@DisabledOnJre(value = JRE.OTHER, disabledReason = "Infinispan 14 does not work on Java 23")
625+
@EnabledForJreRange(min = JRE.JAVA_17, max = JRE.JAVA_22, disabledReason = "Infinispan 14 does not work on Java 23")
626626
void infinispanAsJCacheWithConfig() {
627627
String cachingProviderClassName = JCachingProvider.class.getName();
628628
String configLocation = "infinispan.xml";

0 commit comments

Comments
 (0)