Skip to content

Commit 0ca02ce

Browse files
committed
Disable affected tests on Java 18+/19+
See gh-30185
1 parent db29b65 commit 0ca02ce

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 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.
@@ -23,7 +23,7 @@
2323
import jakarta.persistence.Query;
2424
import jakarta.persistence.TransactionRequiredException;
2525
import org.junit.jupiter.api.Test;
26-
import org.junit.jupiter.api.condition.DisabledOnJre;
26+
import org.junit.jupiter.api.condition.DisabledForJreRange;
2727

2828
import org.springframework.orm.jpa.domain.Person;
2929

@@ -39,7 +39,7 @@
3939
* @author Juergen Hoeller
4040
* @since 2.0
4141
*/
42-
@DisabledOnJre(JAVA_18)
42+
@DisabledForJreRange(min = JAVA_18, disabledReason = "These JPA tests don't pass on Java 18+")
4343
public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEntityManagerFactoryIntegrationTests {
4444

4545
@Test

spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 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.
@@ -24,7 +24,7 @@
2424
import jakarta.persistence.Query;
2525
import jakarta.persistence.TransactionRequiredException;
2626
import org.junit.jupiter.api.Test;
27-
import org.junit.jupiter.api.condition.DisabledOnJre;
27+
import org.junit.jupiter.api.condition.DisabledForJreRange;
2828

2929
import org.springframework.beans.factory.annotation.Autowired;
3030
import org.springframework.dao.DataAccessException;
@@ -43,7 +43,7 @@
4343
* @author Juergen Hoeller
4444
* @since 2.0
4545
*/
46-
@DisabledOnJre(JAVA_18)
46+
@DisabledForJreRange(min = JAVA_18, disabledReason = "These JPA tests don't pass on Java 18+")
4747
public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntityManagerFactoryIntegrationTests {
4848

4949
@Autowired

spring-orm/src/test/java/org/springframework/orm/jpa/eclipselink/EclipseLinkEntityManagerFactoryIntegrationTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 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.
@@ -18,7 +18,7 @@
1818

1919
import org.eclipse.persistence.jpa.JpaEntityManager;
2020
import org.junit.jupiter.api.Test;
21-
import org.junit.jupiter.api.condition.DisabledOnJre;
21+
import org.junit.jupiter.api.condition.DisabledForJreRange;
2222

2323
import org.springframework.orm.jpa.AbstractContainerEntityManagerFactoryIntegrationTests;
2424
import org.springframework.orm.jpa.EntityManagerFactoryInfo;
@@ -31,7 +31,7 @@
3131
*
3232
* @author Juergen Hoeller
3333
*/
34-
@DisabledOnJre(JAVA_18)
34+
@DisabledForJreRange(min = JAVA_18, disabledReason = "These JPA tests don't pass on Java 18+")
3535
public class EclipseLinkEntityManagerFactoryIntegrationTests extends AbstractContainerEntityManagerFactoryIntegrationTests {
3636

3737
@Test

spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/KotlinScriptTemplateTests.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 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.
@@ -21,8 +21,7 @@
2121
import java.util.Map;
2222

2323
import org.junit.jupiter.api.Test;
24-
import org.junit.jupiter.api.condition.DisabledOnJre;
25-
import org.junit.jupiter.api.condition.JRE;
24+
import org.junit.jupiter.api.condition.DisabledForJreRange;
2625

2726
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
2827
import org.springframework.context.annotation.Bean;
@@ -34,13 +33,14 @@
3433
import org.springframework.web.testfixture.server.MockServerWebExchange;
3534

3635
import static org.assertj.core.api.Assertions.assertThat;
36+
import static org.junit.jupiter.api.condition.JRE.JAVA_19;
3737

3838
/**
3939
* Unit tests for Kotlin script templates running on Kotlin JSR-223 support.
4040
*
4141
* @author Sebastien Deleuze
4242
*/
43-
@DisabledOnJre(value = JRE.JAVA_19, disabledReason = "Kotlin doesn't support Java 19 yet")
43+
@DisabledForJreRange(min = JAVA_19, disabledReason = "Kotlin doesn't support Java 19+ yet")
4444
public class KotlinScriptTemplateTests {
4545

4646
@Test

spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/KotlinScriptTemplateTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
import jakarta.servlet.ServletContext;
2424
import org.junit.jupiter.api.BeforeEach;
2525
import org.junit.jupiter.api.Test;
26-
import org.junit.jupiter.api.condition.DisabledOnJre;
27-
import org.junit.jupiter.api.condition.JRE;
26+
import org.junit.jupiter.api.condition.DisabledForJreRange;
2827

2928
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
3029
import org.springframework.context.annotation.Bean;
@@ -36,6 +35,7 @@
3635
import org.springframework.web.testfixture.servlet.MockServletContext;
3736

3837
import static org.assertj.core.api.Assertions.assertThat;
38+
import static org.junit.jupiter.api.condition.JRE.JAVA_19;
3939
import static org.mockito.Mockito.mock;
4040

4141
/**
@@ -44,7 +44,7 @@
4444
* @author Sebastien Deleuze
4545
* @author Sam Brannen
4646
*/
47-
@DisabledOnJre(value = JRE.JAVA_19, disabledReason = "Kotlin doesn't support Java 19 yet")
47+
@DisabledForJreRange(min = JAVA_19, disabledReason = "Kotlin doesn't support Java 19+ yet")
4848
class KotlinScriptTemplateTests {
4949

5050
private WebApplicationContext webAppContext = mock();

0 commit comments

Comments
 (0)