mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-14 04:08:16 +00:00
`make test-backend-app` fails on any JDK newer than 22 with 18 errors, all "Mockito cannot mock this class": 7 in S3StorageServiceTest and 11 in NotificationServiceTest. Spring Boot 3.2.3 manages Byte Buddy 1.14.12, which knows class file versions only up to Java 22, so it cannot instrument a mock's type hierarchy on a newer JVM. It fails identically on a clean tree, so the pre-PR checklist has been red for reasons unrelated to any change under review. Overrides the managed version to 1.17.5, which covers Java 24 and 25. The compile target stays at 21. Byte Buddy is compile-scoped, reaching Hibernate's runtime bytecode enhancement and not only Mockito, so this was verified beyond the unit tests: the application starts, all 65 migrations apply, the logs carry no enhancement errors, and the staging smoke test passes 15/15. Restoring 1.14.12 brings the 14 S3 mock failures straight back. Verified: make test-backend-app BUILD SUCCESS, 0 "cannot mock" S3StorageServiceTest 14/14 NotificationServiceTest 11/11 scripts/smoke-test.sh against local staging 15/15
80 lines
3.2 KiB
XML
80 lines
3.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
|
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
<version>3.2.3</version>
|
|
<relativePath/>
|
|
</parent>
|
|
|
|
<groupId>com.iflytek.skillhub</groupId>
|
|
<artifactId>skillhub-parent</artifactId>
|
|
<version>0.1.0</version>
|
|
<packaging>pom</packaging>
|
|
|
|
<properties>
|
|
<java.version>21</java.version>
|
|
<maven.compiler.source>21</maven.compiler.source>
|
|
<maven.compiler.target>21</maven.compiler.target>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<!--
|
|
Spring Boot 3.2.3 manages Byte Buddy 1.14.12, which knows class file versions up to
|
|
Java 22. The build targets Java 21, but a contributor running a newer JDK executes the
|
|
tests on that JVM, and Mockito then fails with "Mockito cannot mock this class" for
|
|
every mock whose type hierarchy it must instrument. That is a toolchain gap, not a code
|
|
fault. Overriding the managed version keeps mocking usable on newer JDKs while leaving
|
|
the compile target at 21.
|
|
-->
|
|
<byte-buddy.version>1.17.5</byte-buddy.version>
|
|
</properties>
|
|
|
|
<modules>
|
|
<module>skillhub-app</module>
|
|
<module>skillhub-domain</module>
|
|
<module>skillhub-auth</module>
|
|
<module>skillhub-search</module>
|
|
<module>skillhub-storage</module>
|
|
<module>skillhub-infra</module>
|
|
<module>skillhub-notification</module>
|
|
</modules>
|
|
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>com.iflytek.skillhub</groupId>
|
|
<artifactId>skillhub-domain</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.iflytek.skillhub</groupId>
|
|
<artifactId>skillhub-auth</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.iflytek.skillhub</groupId>
|
|
<artifactId>skillhub-search</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.iflytek.skillhub</groupId>
|
|
<artifactId>skillhub-storage</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.iflytek.skillhub</groupId>
|
|
<artifactId>skillhub-infra</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.iflytek.skillhub</groupId>
|
|
<artifactId>skillhub-notification</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
</project>
|