Skip to content

Fix flaky game test caused by shared tank login sync - #1287

Merged
rubensworks merged 1 commit into
master-26-ltsfrom
claude/vibrant-cerf-j8r8gb
Oct 16, 2026
Merged

rubensworks merged 1 commit into
master-26-ltsfrom
claude/vibrant-cerf-j8r8gb

Conversation

@rubensworks

Copy link
Copy Markdown
Member

Fixes the random failure of gametestsbiomeextract_testbiomeextractthrowwithtrackingplayer seen in https://github.com/CyclopsMC/EvilCraft/actions/runs/38844811486/job/116792809306.

Cause

WorldSharedTankCache#onLoggedIn sends an UpdateWorldSharedTankClientCachePacket per shared tank to every joining player. Game test mock players (makeMockServerPlayerInLevel) have no EvilCraft channel, so NeoForge throws UnsupportedOperationException: Payload evilcraft:update_world_shared_tank_client_cache may not be sent to the client!.

This only happens when the shared tank storage is non-empty, i.e. when an entangled chalice test happened to run earlier. Test order varies, so any test using a mock server player could fail randomly.

Fix

Catch UnsupportedOperationException around the login sync, matching the existing handling in WorldSharedTankCache#onTick and EntityBiomeExtract#updateChunkAfterBiomeChange.

Test

Added testEntangledChaliceLoginWithoutChannel, which creates a shared tank and then a mock server player. Without the fix it fails deterministically; with it, all 104 game tests pass, and ./gradlew build passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ERjcy5vTk2HjkUTCDMziFA


Generated by Claude Code

WorldSharedTankCache#onLoggedIn sent update packets to every joining
player, which throws for players without the EvilCraft channel, such as
game test mock players. This made game tests using mock server players
fail whenever an earlier test had created a shared tank.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ERjcy5vTk2HjkUTCDMziFA
@rubensworks
rubensworks merged commit 3b6bfb4 into master-26-lts Oct 16, 2026
3 checks passed
@rubensworks
rubensworks deleted the claude/vibrant-cerf-j8r8gb branch October 16, 2026 03:51
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 38847405455

Warning

No base build found for commit 7c6e36a on master-26-lts.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 40.396%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 16054
Covered Lines: 7426
Line Coverage: 46.26%
Relevant Branches: 5520
Covered Branches: 1289
Branch Coverage: 23.35%
Branches in Coverage %: Yes
Coverage Strength: 2.23 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants