Skip to content

test(nether): wait for the overworld chunks after the return portal - #4055

Open
u9g wants to merge 1 commit into
masterfrom
test/nether-return-chunk-wait
Open

test(nether): wait for the overworld chunks after the return portal#4055
u9g wants to merge 1 commit into
masterfrom
test/nether-return-chunk-wait

Conversation

@u9g

@u9g u9g commented Sep 5, 2026

Copy link
Copy Markdown
Member

The nether test's return leg only awaited the spawn event. The respawn lands the bot exactly at origin, so resetState takes its no-teleport path and never calls waitForChunksToLoad. On a slow runner the overworld spawn column arrives after the following tests have already started; in run 33949373493 the 1.14.4 trace shows the position packet, then particles and all four placeBlock attempts inside ~60ms, and only then the map_chunk for 0,0. bot.blockAt returned null for the reference block on every attempt, since mocha's retries re-run instantly against the same empty world.

Wait for the chunks on the way back, as the outbound leg already does. waitForChunksToLoad is a no-op when the columns are present, so normal runs pay nothing.

Ran nether and placeBlock emits blockPlaced locally on 1.8.8, 1.14.4 and 1.21.8: all pass.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Tests more than 1.5x slower than master (durations are noisy, so this is informational):

   3411ms ->    8792ms  mineflayer_external 1.11.2v nether
   3459ms ->    8636ms  mineflayer_external 1.9.4v nether
  12936ms ->   24337ms  mineflayer_external 1.19v nether
   5485ms ->   12242ms  mineflayer_external 1.21.8v nether
  10934ms ->   16503ms  mineflayer_external 26.1v nether

@rom1504

rom1504 commented Sep 5, 2026

Copy link
Copy Markdown
Member

CI fails

The return leg only awaited the spawn event. The respawn lands the bot at
origin, so the per-test reset takes the no-teleport path and never calls
waitForChunksToLoad. On a slow runner the overworld spawn column arrived
after the next tests had already started, so placeBlock got a null
reference block on 1.14.4 (all four attempts in run 33949373493, since
mocha's retries re-run instantly against the same empty world). Wait for
the chunks on the way back, as the outbound leg already does.
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.

2 participants