From 65163dd55b070dae10ff467e7c7ec6c42595ce89 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 9 Oct 2026 02:29:26 +0000 Subject: [PATCH] Upgrade JUnit 5.14.4 -> 6.1.3 Test scope only; the jar is unchanged. All 81 tests pass on JDK 25 with no test-code changes or new deprecation warnings, and surefire 3.6.0 picks up the JUnit Platform 6 provider automatically. Docs and an [Unreleased] CHANGELOG entry updated. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018syaxkhsW9ioZChSmth9Xx --- CHANGELOG.md | 7 +++++++ CLAUDE.md | 4 ++-- README.md | 4 ++-- pom.xml | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b8979e..8b67759 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ 本專案的重要變更都記錄在這裡。格式參考 [Keep a Changelog](https://keepachangelog.com/zh-TW/1.1.0/),版本號遵循 [Semantic Versioning](https://semver.org/lang/zh-TW/)。 +## [Unreleased] + +### 變更 + +- 測試依賴:JUnit 5.14.4 → 6.1.3。只影響測試,產出的 JAR 不變;81 個測試不需修改即全數通過。 + ## [2.0.0] - 2026-10-09 ### ⚠️ 不相容變更 @@ -51,5 +57,6 @@ - 核心功能的 characterization tests(JUnit 5 + Mockito,共 73 個),記錄目前的行為。 - 測試用的 `TestRegistryAccess`,讓 `Material.isAir()` 不需要啟動伺服器也能在測試中使用。 +[Unreleased]: https://github.com/MrPippi/AutoPickup/compare/v2.0.0...HEAD [2.0.0]: https://github.com/MrPippi/AutoPickup/compare/v1.0.0...v2.0.0 [1.0.0]: https://github.com/MrPippi/AutoPickup/tree/6c3257c diff --git a/CLAUDE.md b/CLAUDE.md index fba372c..da24536 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -19,7 +19,7 @@ A Paper Minecraft plugin (Java 25, Maven) that auto-pickups block drops directly **Requirements:** JDK 25 exactly (`[25,26)` range enforced). Set `JAVA_HOME` to JDK 25 before building. -`./mvnw test` runs JUnit 5 + Mockito characterization tests in `src/test` (they record current behaviour, not desired behaviour). In-game testing is still needed for GUI/event wiring. `src/test/.../testsupport/TestRegistryAccess` lets `Material.isAir()` work without a server. +`./mvnw test` runs JUnit 6 + Mockito characterization tests in `src/test` (they record current behaviour, not desired behaviour). In-game testing is still needed for GUI/event wiring. `src/test/.../testsupport/TestRegistryAccess` lets `Material.isAir()` work without a server. --- @@ -174,7 +174,7 @@ Invalid UUID keys are silently skipped on load. |---|---|---| | `io.papermc.paper:paper-api` | 26.2.build.132-stable (Adventure 5.2.0) | compile | | `me.clip:placeholderapi` | 2.11.7 | compile, optional (not shaded) | -| `org.junit.jupiter:junit-jupiter` | 5.14.4 | test | +| `org.junit.jupiter:junit-jupiter` | 6.1.3 | test | | `org.mockito:mockito-core` | 5.24.0 | test (loaded via `-javaagent` in surefire `argLine`) | Repositories: `https://repo.papermc.io/repository/maven-public/` and `https://repo.helpch.at/releases/` diff --git a/README.md b/README.md index cb3d41b..0d9cf8c 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Paper 插件:玩家挖掘方塊時,掉落物自動進入背包。背包已 > 建置前請將 `JAVA_HOME` 設為 JDK 25;enforcer 會拒絕其他版本。 -`./mvnw clean package` 會一併執行 `src/test` 的單元測試(JUnit 5 + Mockito)。這些是 characterization tests,記錄的是**目前的行為**;遊戲內的 GUI 與事件流程仍需手動測試。GitHub Actions 會在每次 push 到 `main` 與每個 PR 上執行同樣的建置,並把 JAR 上傳成 artifact。 +`./mvnw clean package` 會一併執行 `src/test` 的單元測試(JUnit 6 + Mockito)。這些是 characterization tests,記錄的是**目前的行為**;遊戲內的 GUI 與事件流程仍需手動測試。GitHub Actions 會在每次 push 到 `main` 與每個 PR 上執行同樣的建置,並把 JAR 上傳成 artifact。 ### 依賴 @@ -37,7 +37,7 @@ Paper 插件:玩家挖掘方塊時,掉落物自動進入背包。背包已 |------|------|------|------| | `io.papermc.paper:paper-api` | 26.2.build.132-stable | compile(伺服器提供) | 內含 Adventure 5.2.0 | | `me.clip:placeholderapi` | 2.11.7 | compile、optional | 不打包進 JAR;執行期使用伺服器上安裝的版本 | -| `org.junit.jupiter:junit-jupiter` | 5.14.4 | test | | +| `org.junit.jupiter:junit-jupiter` | 6.1.3 | test | | | `org.mockito:mockito-core` | 5.24.0 | test | 以 `-javaagent` 載入(surefire `argLine`) | Maven repositories:`https://repo.papermc.io/repository/maven-public/`、`https://repo.helpch.at/releases/`(PlaceholderAPI;舊網址 `repo.extendedclip.com` 已改為轉址)。 diff --git a/pom.xml b/pom.xml index 728b845..b0eccc7 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,7 @@ org.junit.jupiter junit-jupiter - 5.14.4 + 6.1.3 test