diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java index 3f8b9ad45c4..d37cecb4650 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ import jakarta.persistence.EntityManager; import jakarta.persistence.Query; import jakarta.persistence.TransactionRequiredException; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnJre; +import org.junit.jupiter.api.condition.DisabledForJreRange; import org.springframework.orm.jpa.domain.Person; @@ -39,7 +39,7 @@ import static org.junit.jupiter.api.condition.JRE.JAVA_18; * @author Juergen Hoeller * @since 2.0 */ -@DisabledOnJre(JAVA_18) +@DisabledForJreRange(min = JAVA_18, disabledReason = "These JPA tests don't pass on Java 18+") public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEntityManagerFactoryIntegrationTests { @Test diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java index 37df753581c..d1c6ff0cb8b 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ import jakarta.persistence.PersistenceException; import jakarta.persistence.Query; import jakarta.persistence.TransactionRequiredException; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnJre; +import org.junit.jupiter.api.condition.DisabledForJreRange; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataAccessException; @@ -43,7 +43,7 @@ import static org.junit.jupiter.api.condition.JRE.JAVA_18; * @author Juergen Hoeller * @since 2.0 */ -@DisabledOnJre(JAVA_18) +@DisabledForJreRange(min = JAVA_18, disabledReason = "These JPA tests don't pass on Java 18+") public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntityManagerFactoryIntegrationTests { @Autowired diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/eclipselink/EclipseLinkEntityManagerFactoryIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/eclipselink/EclipseLinkEntityManagerFactoryIntegrationTests.java index 2cb89213941..43f2e121ab8 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/eclipselink/EclipseLinkEntityManagerFactoryIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/eclipselink/EclipseLinkEntityManagerFactoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ package org.springframework.orm.jpa.eclipselink; import org.eclipse.persistence.jpa.JpaEntityManager; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnJre; +import org.junit.jupiter.api.condition.DisabledForJreRange; import org.springframework.orm.jpa.AbstractContainerEntityManagerFactoryIntegrationTests; import org.springframework.orm.jpa.EntityManagerFactoryInfo; @@ -31,7 +31,7 @@ import static org.junit.jupiter.api.condition.JRE.JAVA_18; * * @author Juergen Hoeller */ -@DisabledOnJre(JAVA_18) +@DisabledForJreRange(min = JAVA_18, disabledReason = "These JPA tests don't pass on Java 18+") public class EclipseLinkEntityManagerFactoryIntegrationTests extends AbstractContainerEntityManagerFactoryIntegrationTests { @Test diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/KotlinScriptTemplateTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/KotlinScriptTemplateTests.java index 5181b994403..6b76f4f8ebc 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/KotlinScriptTemplateTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/KotlinScriptTemplateTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,7 @@ import java.util.Locale; import java.util.Map; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnJre; -import org.junit.jupiter.api.condition.JRE; +import org.junit.jupiter.api.condition.DisabledForJreRange; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; @@ -34,13 +33,14 @@ import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRe import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.condition.JRE.JAVA_19; /** * Unit tests for Kotlin script templates running on Kotlin JSR-223 support. * * @author Sebastien Deleuze */ -@DisabledOnJre(value = JRE.JAVA_19, disabledReason = "Kotlin doesn't support Java 19 yet") +@DisabledForJreRange(min = JAVA_19, disabledReason = "Kotlin doesn't support Java 19+ yet") public class KotlinScriptTemplateTests { @Test diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/KotlinScriptTemplateTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/KotlinScriptTemplateTests.java index d97fe5015bd..7a60d59706a 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/KotlinScriptTemplateTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/KotlinScriptTemplateTests.java @@ -23,8 +23,7 @@ import java.util.Map; import jakarta.servlet.ServletContext; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledOnJre; -import org.junit.jupiter.api.condition.JRE; +import org.junit.jupiter.api.condition.DisabledForJreRange; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; @@ -36,6 +35,7 @@ import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import org.springframework.web.testfixture.servlet.MockServletContext; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.condition.JRE.JAVA_19; import static org.mockito.Mockito.mock; /** @@ -44,7 +44,7 @@ import static org.mockito.Mockito.mock; * @author Sebastien Deleuze * @author Sam Brannen */ -@DisabledOnJre(value = JRE.JAVA_19, disabledReason = "Kotlin doesn't support Java 19 yet") +@DisabledForJreRange(min = JAVA_19, disabledReason = "Kotlin doesn't support Java 19+ yet") class KotlinScriptTemplateTests { private WebApplicationContext webAppContext = mock();