Skip to content

Fix spring-orm tests with eclipselink and Java 18+ #31078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion framework-platform/framework-platform.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ dependencies {
api("org.crac:crac:1.3.0")
api("org.dom4j:dom4j:2.1.4")
api("org.eclipse.jetty:jetty-reactive-httpclient:3.0.8")
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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@
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,
Expand All @@ -39,7 +37,6 @@
* @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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
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;
Expand All @@ -34,7 +33,6 @@
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
Expand All @@ -43,7 +41,6 @@
* @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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,17 @@

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.Map;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
Expand All @@ -33,14 +32,12 @@
import org.springframework.web.testfixture.server.MockServerWebExchange;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.condition.JRE.JAVA_21;

/**
* Unit tests for Kotlin script templates running on Kotlin JSR-223 support.
*
* @author Sebastien Deleuze
*/
@DisabledForJreRange(min = JAVA_21, disabledReason = "Kotlin doesn't support Java 21+ yet")
class KotlinScriptTemplateTests {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import jakarta.servlet.ServletContext;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledForJreRange;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
Expand All @@ -35,7 +34,6 @@
import org.springframework.web.testfixture.servlet.MockServletContext;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.condition.JRE.JAVA_21;
import static org.mockito.Mockito.mock;

/**
Expand All @@ -44,7 +42,6 @@
* @author Sebastien Deleuze
* @author Sam Brannen
*/
@DisabledForJreRange(min = JAVA_21, disabledReason = "Kotlin doesn't support Java 21+ yet")
class KotlinScriptTemplateTests {

private WebApplicationContext webAppContext = mock();
Expand Down