Browse Source

Fix spring-orm tests with eclipselink and Java 18+

See gh-31078
pull/30079/head
Dmitrii Bocharov 1 year ago committed by Stéphane Nicoll
parent
commit
ce778cee27
  1. 2
      framework-platform/framework-platform.gradle
  2. 3
      spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java
  3. 3
      spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java
  4. 3
      spring-orm/src/test/java/org/springframework/orm/jpa/eclipselink/EclipseLinkEntityManagerFactoryIntegrationTests.java

2
framework-platform/framework-platform.gradle

@ -116,7 +116,7 @@ dependencies { @@ -116,7 +116,7 @@ dependencies {
api("org.crac:crac:1.4.0")
api("org.dom4j:dom4j:2.1.4")
api("org.eclipse.jetty:jetty-reactive-httpclient:4.0.0")
api("org.eclipse.persistence:org.eclipse.persistence.jpa:3.0.3")
api("org.eclipse.persistence:org.eclipse.persistence.jpa:4.0.2")
api("org.eclipse:yasson:2.0.4")
api("org.ehcache:ehcache:3.10.8")
api("org.ehcache:jcache:1.0.1")

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

@ -23,13 +23,11 @@ import jakarta.persistence.EntityManager; @@ -23,13 +23,11 @@ import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;
import jakarta.persistence.TransactionRequiredException;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;
import org.springframework.orm.jpa.domain.Person;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.junit.jupiter.api.condition.JRE.JAVA_18;
/**
* An application-managed entity manager can join an existing transaction,
@ -39,7 +37,6 @@ import static org.junit.jupiter.api.condition.JRE.JAVA_18; @@ -39,7 +37,6 @@ import static org.junit.jupiter.api.condition.JRE.JAVA_18;
* @author Juergen Hoeller
* @since 2.0
*/
@DisabledForJreRange(min = JAVA_18, disabledReason = "These JPA tests don't pass on Java 18+")
public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEntityManagerFactoryIntegrationTests {
@Test

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

@ -24,7 +24,6 @@ import jakarta.persistence.PersistenceException; @@ -24,7 +24,6 @@ import jakarta.persistence.PersistenceException;
import jakarta.persistence.Query;
import jakarta.persistence.TransactionRequiredException;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
@ -34,7 +33,6 @@ import org.springframework.orm.jpa.domain.Person; @@ -34,7 +33,6 @@ import org.springframework.orm.jpa.domain.Person;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
import static org.junit.jupiter.api.condition.JRE.JAVA_18;
/**
* Integration tests using in-memory database for container-managed JPA
@ -43,7 +41,6 @@ import static org.junit.jupiter.api.condition.JRE.JAVA_18; @@ -43,7 +41,6 @@ import static org.junit.jupiter.api.condition.JRE.JAVA_18;
* @author Juergen Hoeller
* @since 2.0
*/
@DisabledForJreRange(min = JAVA_18, disabledReason = "These JPA tests don't pass on Java 18+")
public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntityManagerFactoryIntegrationTests {
@Autowired

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

@ -18,20 +18,17 @@ package org.springframework.orm.jpa.eclipselink; @@ -18,20 +18,17 @@ package org.springframework.orm.jpa.eclipselink;
import org.eclipse.persistence.jpa.JpaEntityManager;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;
import org.springframework.orm.jpa.AbstractContainerEntityManagerFactoryIntegrationTests;
import org.springframework.orm.jpa.EntityManagerFactoryInfo;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.condition.JRE.JAVA_18;
/**
* EclipseLink-specific JPA tests.
*
* @author Juergen Hoeller
*/
@DisabledForJreRange(min = JAVA_18, disabledReason = "These JPA tests don't pass on Java 18+")
public class EclipseLinkEntityManagerFactoryIntegrationTests extends AbstractContainerEntityManagerFactoryIntegrationTests {
@Test

Loading…
Cancel
Save