Disable affected tests on Java 18+/19+

See gh-30185
This commit is contained in:
Sam Brannen 2023-03-24 14:08:41 +01:00
parent db29b65399
commit 0ca02ce677
5 changed files with 16 additions and 16 deletions

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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.Query;
import jakarta.persistence.TransactionRequiredException; import jakarta.persistence.TransactionRequiredException;
import org.junit.jupiter.api.Test; 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; import org.springframework.orm.jpa.domain.Person;
@ -39,7 +39,7 @@ import static org.junit.jupiter.api.condition.JRE.JAVA_18;
* @author Juergen Hoeller * @author Juergen Hoeller
* @since 2.0 * @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 { public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEntityManagerFactoryIntegrationTests {
@Test @Test

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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.Query;
import jakarta.persistence.TransactionRequiredException; import jakarta.persistence.TransactionRequiredException;
import org.junit.jupiter.api.Test; 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.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException; import org.springframework.dao.DataAccessException;
@ -43,7 +43,7 @@ import static org.junit.jupiter.api.condition.JRE.JAVA_18;
* @author Juergen Hoeller * @author Juergen Hoeller
* @since 2.0 * @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 { public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntityManagerFactoryIntegrationTests {
@Autowired @Autowired

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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.eclipse.persistence.jpa.JpaEntityManager;
import org.junit.jupiter.api.Test; 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.AbstractContainerEntityManagerFactoryIntegrationTests;
import org.springframework.orm.jpa.EntityManagerFactoryInfo; import org.springframework.orm.jpa.EntityManagerFactoryInfo;
@ -31,7 +31,7 @@ import static org.junit.jupiter.api.condition.JRE.JAVA_18;
* *
* @author Juergen Hoeller * @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 { public class EclipseLinkEntityManagerFactoryIntegrationTests extends AbstractContainerEntityManagerFactoryIntegrationTests {
@Test @Test

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 java.util.Map;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnJre; import org.junit.jupiter.api.condition.DisabledForJreRange;
import org.junit.jupiter.api.condition.JRE;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean; 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 org.springframework.web.testfixture.server.MockServerWebExchange;
import static org.assertj.core.api.Assertions.assertThat; 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. * Unit tests for Kotlin script templates running on Kotlin JSR-223 support.
* *
* @author Sebastien Deleuze * @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 { public class KotlinScriptTemplateTests {
@Test @Test

View File

@ -23,8 +23,7 @@ import java.util.Map;
import jakarta.servlet.ServletContext; import jakarta.servlet.ServletContext;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnJre; import org.junit.jupiter.api.condition.DisabledForJreRange;
import org.junit.jupiter.api.condition.JRE;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean; 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 org.springframework.web.testfixture.servlet.MockServletContext;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.condition.JRE.JAVA_19;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
/** /**
@ -44,7 +44,7 @@ import static org.mockito.Mockito.mock;
* @author Sebastien Deleuze * @author Sebastien Deleuze
* @author Sam Brannen * @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 { class KotlinScriptTemplateTests {
private WebApplicationContext webAppContext = mock(); private WebApplicationContext webAppContext = mock();