Skip to content

Fix flaky day/night world-reader game tests#1666

Draft
Copilot wants to merge 3 commits intomaster-26from
copilot/fix-gametests-failures
Draft

Fix flaky day/night world-reader game tests#1666
Copilot wants to merge 3 commits intomaster-26from
copilot/fix-gametests-failures

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

  • Investigated root cause of intermittent testAspectsReadWorldIsDayAndIsNight failures
  • Eliminated runAfterDelay(1) race condition: other tests' environment teardowns could reset the clock during the 1-tick wait, causing skyDarken to reflect the wrong time
  • Replaced runAfterDelay with direct synchronous calls: invalidateTickCache() + updateSkyBrightness() immediately after setTotalTicks, then assert without waiting
  • Replaced Optional.ifPresent() with getOrThrow() so clock-lookup failures are immediately visible rather than silently skipped
  • Build passes; 30-run validation showed 2/18 failures still, with new error "Cannot invoke String.isEmpty() because text is null" (a Minecraft framework secondary NPE wrapping the real assertion failure). Investigation showed these were still assertion failures at tick 0 (ISDAY=false when expecting true), suggesting the clock may not always be reflected in skyDarken immediately — further root-cause analysis was cut off by time

Copilot AI and others added 2 commits April 19, 2026 17:41
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 20, 2026

Coverage Status

coverage: 53.972% (+0.03%) from 53.947% — copilot/fix-gametests-failures into master-26

…teSkyBrightness synchronously

Agent-Logs-Url: https://github.com/CyclopsMC/IntegratedDynamics/sessions/8e2c5597-58bf-48a8-88e4-3c17b8865e97

Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
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