You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bump @types/node to 25.2.1 + fix flaky time & nether tests (#3828)
* Bump @types/node from 24.0.6 to 25.2.1 and fix flaky tests
Bump @types/node to ^25.2.1 (from #3821) and fix two flaky tests that
were causing spurious CI failures:
- time: disable daylight cycle during /time set assertions to prevent
drift (e.g. expected 18000, got 21695)
- nether: add stabilization wait after chunk loading on slow CI
Co-authored-by: Cursor <cursoragent@cursor.com>
* Increase runExample timeout from 30s to 60s
The 30s timeout for example tests covers child process spawn, server
join, 5s stabilization wait, chunk loading, and the actual test. On
slow CI runners this was too tight, causing spurious timeouts (e.g.
exampleBee on 1.19.3).
Co-authored-by: Cursor <cursoragent@cursor.com>
* Replace timeout-based test fixes with robust alternatives
nether: Replace blind 1s wait with polling loop that checks for a
solid block below before placing. Mocha's 90s test timeout is the
backstop.
runExample: Remove withTimeout wrapper (mocha handles overall timeout),
remove 5s setTimeout before saying "loaded" (server command ordering
guarantees the TP is applied before the chat message reaches the child),
remove timeout from child join detection. This eliminates the premature
"Promise timed out" failures on slow CI.
testCommon: Increase base onceWithCleanup timeout from 5s to 20s for
helper functions (gamemode change, teleport, clear inventory, etc.)
to prevent spurious failures on slow CI while still providing useful
error messages.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Fix runExample: wait for child entity + physics settling
The child bot's physics engine needs time to initialize at the
teleported position (ground detection, etc.) before tests that
require jumping (exampleDigger build) can work.
Replace the removed blind 5s setTimeout with:
1. Condition-based poll for child entity at the TP target position
2. waitForTicks(60) for physics engine to settle (~3s game time)
This is more robust than the original setTimeout because the entity
check adapts to server speed and waitForTicks is tied to game ticks.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Simeon Kummer <simeon@hitthecode.de>
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments