Skip to content

test(sync): cover registered block and item sync paths#18

Merged
QiuYe-123 merged 5 commits into
26.1from
feat/sync-gametest-content-26.1
Apr 30, 2026
Merged

test(sync): cover registered block and item sync paths#18
QiuYe-123 merged 5 commits into
26.1from
feat/sync-gametest-content-26.1

Conversation

@QiuYe-123
Copy link
Copy Markdown
Member

What / 目的

本 PR 增加已注册的测试内容,使同步相关 GameTest 不只停留在内存夹具层,而是覆盖更接近真实运行时的方块实体与方块物品链路。

Implementation Details / 实现细节

  • 在测试源码集中注册测试专用内容:
    • 测试方块
    • 测试方块物品
    • 测试方块实体类型
  • 在测试框架入口中挂接测试内容注册
  • 新增真实 ManagedSyncBlockEntity 测试夹具
  • 新增 GameTest 覆盖以下场景:
    • 已注册方块实体同步链路
    • 已注册方块物品 / DataComponent 同步链路
  • 调整现有客户端网络更新测试,使其符合真实流程:
    • scanAndMarkChanges()
    • collectClientNetworkChanges()

Outcome / 结果

  • 覆盖了已注册方块 / 方块实体 / 方块物品的真实同步路径
  • 验证了方块物品 DataComponent 往返行为
  • 验证了轻量显式同步在真实运行时环境下仍能通过测试

Additional Information / 附加信息

已完成以下验证:

  • 项目重建通过
  • runGameTestServer 通过
  • 19 个必需测试全部通过

Potential Compatibility Issues / 潜在兼容性问题

无生产 API 变更。
本 PR 仅增加和调整测试侧内容与覆盖范围。

@QiuYe-123 QiuYe-123 self-assigned this Apr 30, 2026
@QiuYe-123 QiuYe-123 requested a review from a team as a code owner April 30, 2026 07:19
@QiuYe-123 QiuYe-123 added Release: Major - 0.X.0 Releases focused on Content, changes to gameplay; While maintaining mostly API stability. type: tests Test related changes labels Apr 30, 2026
@github-actions github-actions Bot added 26.1 Tests: Passed Game Tests have passed on this PR labels Apr 30, 2026
@QiuYe-123 QiuYe-123 merged commit 18a61e3 into 26.1 Apr 30, 2026
4 checks passed
@QiuYe-123 QiuYe-123 deleted the feat/sync-gametest-content-26.1 branch April 30, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

26.1 Release: Major - 0.X.0 Releases focused on Content, changes to gameplay; While maintaining mostly API stability. Tests: Passed Game Tests have passed on this PR type: tests Test related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant