Skip to content

Commit

Permalink
Avoid using JRE.OTHER for Infinispan tests
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Aug 19, 2024
1 parent d627a5d commit 6fd1f0f
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import org.infinispan.jcache.embedded.JCachingProvider;
import org.infinispan.spring.embedded.provider.SpringEmbeddedCacheManager;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.EnabledForJreRange;
import org.junit.jupiter.api.condition.JRE;

import org.springframework.beans.factory.BeanCreationException;
Expand Down Expand Up @@ -569,7 +569,7 @@ void hazelcastAsJCacheWithExistingHazelcastInstance() {
}

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

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

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

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

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

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

0 comments on commit 6fd1f0f

Please sign in to comment.