Browse Source

Polishing

pull/30183/head
Sam Brannen 2 years ago
parent
commit
18adf905a8
  1. 10
      gradle/toolchains.gradle
  2. 6
      spring-core/src/test/java/org/springframework/core/SpringCoreBlockHoundIntegrationTests.java
  3. 4
      spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java
  4. 4
      spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java
  5. 4
      spring-orm/src/test/java/org/springframework/orm/jpa/eclipselink/EclipseLinkEntityManagerFactoryIntegrationTests.java

10
gradle/toolchains.gradle

@ -5,10 +5,10 @@ @@ -5,10 +5,10 @@
* One can choose the toolchain to use for compiling the MAIN sources and/or compiling
* and running the TEST sources. These options apply to Java, Kotlin and Groovy sources
* when available.
* {@code "./gradlew check -PmainToolchain=17 -PtestToolchain=19"} will use:
* {@code "./gradlew check -PmainToolchain=17 -PtestToolchain=20"} will use:
* <ul>
* <li>a JDK17 toolchain for compiling the main SourceSet
* <li>a JDK19 toolchain for compiling and running the test SourceSet
* <li>a JDK20 toolchain for compiling and running the test SourceSet
* </ul>
*
* By default, the build will fall back to using the current JDK and 17 language level for all sourceSets.
@ -23,9 +23,9 @@ @@ -23,9 +23,9 @@
* {@code
* $ echo JDK17
* /opt/openjdk/java17
* $ echo JDK19
* /opt/openjdk/java18
* $ ./gradlew -Porg.gradle.java.installations.fromEnv=JDK17,JDK19 check
* $ echo JDK20
* /opt/openjdk/java20
* $ ./gradlew -Porg.gradle.java.installations.fromEnv=JDK17,JDK20 check
* }
*
* @author Brian Clozel

6
spring-core/src/test/java/org/springframework/core/SpringCoreBlockHoundIntegrationTests.java

@ -21,8 +21,7 @@ import java.util.concurrent.CompletableFuture; @@ -21,8 +21,7 @@ import java.util.concurrent.CompletableFuture;
import org.junit.jupiter.api.BeforeAll;
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 reactor.blockhound.BlockHound;
import reactor.core.scheduler.ReactorBlockHoundIntegration;
import reactor.core.scheduler.Schedulers;
@ -31,6 +30,7 @@ import org.springframework.util.ConcurrentReferenceHashMap; @@ -31,6 +30,7 @@ import org.springframework.util.ConcurrentReferenceHashMap;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.jupiter.api.condition.JRE.JAVA_18;
/**
* Tests to verify the spring-core BlockHound integration rules.
@ -47,7 +47,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; @@ -47,7 +47,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
* @author Sam Brannen
* @since 5.2.4
*/
@DisabledOnJre(value= {JRE.JAVA_18, JRE.JAVA_19, JRE.JAVA_20}, disabledReason = "BlockHound is not compatible with Java 18+")
@DisabledForJreRange(min = JAVA_18, disabledReason = "BlockHound is not compatible with Java 18+")
class SpringCoreBlockHoundIntegrationTests {
@BeforeAll

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

@ -24,12 +24,12 @@ import jakarta.persistence.Query; @@ -24,12 +24,12 @@ 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.JRE;
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 +39,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
* @author Juergen Hoeller
* @since 2.0
*/
@DisabledOnJre(value = JRE.JAVA_18)
@DisabledOnJre(JAVA_18)
public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEntityManagerFactoryIntegrationTests {
@Test

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

@ -25,7 +25,6 @@ import jakarta.persistence.Query; @@ -25,7 +25,6 @@ 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.JRE;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
@ -35,6 +34,7 @@ import org.springframework.orm.jpa.domain.Person; @@ -35,6 +34,7 @@ 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 +43,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException; @@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
* @author Juergen Hoeller
* @since 2.0
*/
@DisabledOnJre(value = JRE.JAVA_18)
@DisabledOnJre(JAVA_18)
public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntityManagerFactoryIntegrationTests {
@Autowired

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

@ -19,19 +19,19 @@ package org.springframework.orm.jpa.eclipselink; @@ -19,19 +19,19 @@ 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.JRE;
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
*/
@DisabledOnJre(value = JRE.JAVA_18)
@DisabledOnJre(JAVA_18)
public class EclipseLinkEntityManagerFactoryIntegrationTests extends AbstractContainerEntityManagerFactoryIntegrationTests {
@Test

Loading…
Cancel
Save