Skip to content

Commit 9e602ac

Browse files
committed
Add CI for Java 23
Closes gh-41698
2 parents 9817201 + 7273a4b commit 9e602ac

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

.github/workflows/ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
toolchain: true
2525
- version: 22
2626
toolchain: true
27+
- version: 23-ea
28+
distribution: temurin
29+
toolchain: true
2730
exclude:
2831
- os:
2932
name: Linux

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

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,6 +38,8 @@
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;
42+
import org.junit.jupiter.api.condition.JRE;
4143

4244
import org.springframework.beans.factory.BeanCreationException;
4345
import org.springframework.beans.factory.config.BeanPostProcessor;
@@ -567,6 +569,7 @@ void hazelcastAsJCacheWithExistingHazelcastInstance() {
567569
}
568570

569571
@Test
572+
@DisabledOnJre(value = JRE.OTHER, disabledReason = "Infinispan 14 does not work on Java 23")
570573
void infinispanCacheWithConfig() {
571574
this.contextRunner.withUserConfiguration(DefaultCacheConfiguration.class)
572575
.withPropertyValues("spring.cache.type=infinispan", "spring.cache.infinispan.config=infinispan.xml")
@@ -577,13 +580,15 @@ void infinispanCacheWithConfig() {
577580
}
578581

579582
@Test
583+
@DisabledOnJre(value = JRE.OTHER, disabledReason = "Infinispan 14 does not work on Java 23")
580584
void infinispanCacheWithCustomizers() {
581585
this.contextRunner.withUserConfiguration(DefaultCacheAndCustomizersConfiguration.class)
582586
.withPropertyValues("spring.cache.type=infinispan")
583587
.run(verifyCustomizers("allCacheManagerCustomizer", "infinispanCacheManagerCustomizer"));
584588
}
585589

586590
@Test
591+
@DisabledOnJre(value = JRE.OTHER, disabledReason = "Infinispan 14 does not work on Java 23")
587592
void infinispanCacheWithCaches() {
588593
this.contextRunner.withUserConfiguration(DefaultCacheConfiguration.class)
589594
.withPropertyValues("spring.cache.type=infinispan", "spring.cache.cacheNames[0]=foo",
@@ -593,6 +598,7 @@ void infinispanCacheWithCaches() {
593598
}
594599

595600
@Test
601+
@DisabledOnJre(value = JRE.OTHER, disabledReason = "Infinispan 14 does not work on Java 23")
596602
void infinispanCacheWithCachesAndCustomConfig() {
597603
this.contextRunner.withUserConfiguration(InfinispanCustomConfiguration.class)
598604
.withPropertyValues("spring.cache.type=infinispan", "spring.cache.cacheNames[0]=foo",
@@ -605,6 +611,7 @@ void infinispanCacheWithCachesAndCustomConfig() {
605611
}
606612

607613
@Test
614+
@DisabledOnJre(value = JRE.OTHER, disabledReason = "Infinispan 14 does not work on Java 23")
608615
void infinispanAsJCacheWithCaches() {
609616
String cachingProviderClassName = JCachingProvider.class.getName();
610617
this.contextRunner.withUserConfiguration(DefaultCacheConfiguration.class)
@@ -615,6 +622,7 @@ void infinispanAsJCacheWithCaches() {
615622
}
616623

617624
@Test
625+
@DisabledOnJre(value = JRE.OTHER, disabledReason = "Infinispan 14 does not work on Java 23")
618626
void infinispanAsJCacheWithConfig() {
619627
String cachingProviderClassName = JCachingProvider.class.getName();
620628
String configLocation = "infinispan.xml";

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisAutoConfigurationTests.java

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
import org.apache.activemq.artemis.jms.server.config.impl.JMSQueueConfigurationImpl;
4242
import org.apache.activemq.artemis.jms.server.config.impl.TopicConfigurationImpl;
4343
import org.junit.jupiter.api.Test;
44+
import org.junit.jupiter.api.condition.DisabledOnJre;
45+
import org.junit.jupiter.api.condition.JRE;
4446
import org.junit.jupiter.api.io.TempDir;
4547
import org.messaginghub.pooled.jms.JmsPoolConnectionFactory;
4648

@@ -63,6 +65,7 @@
6365
* @author Eddú Meléndez
6466
* @author Stephane Nicoll
6567
*/
68+
@DisabledOnJre(value = JRE.OTHER, disabledReason = "https://issues.apache.org/jira/browse/ARTEMIS-4975")
6669
class ArtemisAutoConfigurationTests {
6770

6871
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-cache/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def testHazelcast = tasks.register("testHazelcast", Test) {
8686
}
8787

8888
def testInfinispan = tasks.register("testInfinispan", Test) {
89+
enabled = (toolchain.javaVersion == null || toolchain.javaVersion.asInt() < 23)
8990
description = "Runs the tests against Infinispan"
9091
classpath = sourceSets.test.runtimeClasspath + configurations.infinispan
9192
systemProperties = ["spring.cache.jcache.config" : "classpath:infinispan.xml"]

0 commit comments

Comments
 (0)