Repository navigation
test: 26.1 整世界端到端回归(dimensions 布局 + 逐维度强加载 + 非 MCA 文件) - #5
Merged
Merged
Conversation
issue #1「支持 26.1 及后续版本」的能力其实已经落地(`forceload.rs` 认 `data/minecraft/chunk_tickets.dat`、`misc.rs`/`optimizer.rs` 处理 26.1+ Paper 的 `world/dimensions/...` 布局),但回归覆盖只有两处局部用例: `force_load.rs` 只跑**单个维度目录**,`phase4.rs` 用的是合成的小布局。 **整世界**(世界根 + 三个维度 + 世界级 data/players/generated)没有任何用例守着, 而这些恰恰是最容易回归的部分。 新增 `tests/world_26_1.rs`,直接对真实 26.1 fixture 跑 `optimize()`,断言: 1. **维度发现**:三个维度都落在 `dimensions/minecraft/<dim>/{region,entities,poi,data}` 并被处理; 2. **逐维度强加载**:阈值拉到 20M ticks(几乎全删)后,每个维度 `chunk_tickets.dat` 点名的区块**一个不少**(按 region 槽位逐个校验,而不是只看数量); 3. **维度级非 MCA 文件**跟着走(chunk_tickets / game_rules / paper metadata); 4. **世界级文件**(level.dat、data/minecraft/scoreboard.dat、generated/、players/)不丢; 5. **session.lock 不复制**(复制过去服务端会认为世界被占用)。 本机 `cargo fmt/clippy -D warnings/test`(19 个测试二进制)全绿。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
issue #1「支持 26.1 及后续版本」的能力已经落地,但回归覆盖只有局部:
force_load.rs只跑单个维度目录,phase4.rs用合成小布局。整世界(世界根 + 三维度 + 世界级 data/players/generated)没有任何用例守着 —— 而这正是最容易回归的部分。本 PR 只加测试:新增
tests/world_26_1.rs,对真实 26.1 fixture(从 OrzMCBackup 真实世界复制)跑optimize(),断言:dimensions/minecraft/<dim>/{region,entities,poi,data}下被处理(旧逻辑只看顶层region/会直接漏掉整个世界);data/minecraft/chunk_tickets.dat点名的区块一个不少(按 region 槽位逐个校验);chunk_tickets.dat/game_rules.dat/paper/metadata.dat;level.dat、data/minecraft/scoreboard.dat、generated/、players/;session.lock不复制(复制过去服务端会认为世界被占用)。本机:
cargo fmt --all --check/cargo clippy --all-targets --all-features -- -D warnings/cargo test(19 个测试二进制,含新增 1 例)全绿。