Skip to content

Give the furnace crafting game tests a larger tick budget - #241

Merged
rubensworks merged 3 commits into
master-1.21-ltsfrom
fix-furnace-gametest-timeout
Sep 17, 2026
Merged

rubensworks merged 3 commits into
master-1.21-ltsfrom
fix-furnace-gametest-timeout

Conversation

@rubensworks

Copy link
Copy Markdown
Member

Problem

master-1.21-lts is currently red on its own. Re-running the base branch's existing CI run for 417689d unchanged, run 34686805006 attempt 2, fails on runGameTestServer:

testitemscraftingotsandextractfromstorage failed at ...! Slot 0 item is incorrect, was 1 minecraft:raw_iron, jobs=[#246 processing amount=1 operations=1 inputs=[0 minecraft:air] ] results=[] machine=[1=62 minecraft:coal 2=1 minecraft:iron_ingot ]

Its last green run was on 12 September, so this is the environment moving rather than a code change.

Measurements

testItemsCraftIngotsAndExtractFromStorage and testItemsCraftIngotsAndExtractFromStorageSameNetwork smelt eight ingots one at a time under timeoutTicks = TIMEOUT * 2, so 4000 ticks.

I instrumented both with helper.getTick() and ran the suite three times locally (instrumentation not committed):

run ...ExtractFromStorage ...SameNetwork
1 1902 2037
2 1852 1952
3 1722 1757

So locally they finish around tick 1750-2050, comfortably inside 4000.

On CI they do not finish within 4000 at all. Reading the leftovers in the failure messages, the runs completed five to seven of the eight crafts, which puts them at roughly 570 to 800 ticks per craft and extrapolates to 4600-6400 ticks needed, against roughly 240 per craft locally.

Fix

Raise both tests to TIMEOUT * 5, so 10000 ticks. That covers the slowest run extrapolated above with room to spare, and costs nothing when tests pass, since succeedWhen returns as soon as the assertion holds. The full suite still completes in about 15 seconds locally.

What this does not fix

A tick budget is wall-clock independent by construction, so the per-craft tick cost varying by more than 2x between my machine and the runner is itself the interesting part. It suggests crafting progress is partly wall-clock bound, so that a slower server advances fewer crafting operations per game tick. This PR only stops the suite being red; that behaviour is worth a separate look, and I have not touched it here.

Testing

  • ./gradlew build passes.
  • ./gradlew runGameTestServer: all 76 tests pass.

Related: #240 inherits this failure, and is otherwise unaffected by it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Nb7EmAYd4R7RYWjmc17e6L


Generated by Claude Code

testItemsCraftIngotsAndExtractFromStorage and its same-network variant
smelt eight ingots one at a time, and no longer fit in their budget on
the CI runners. An unmodified master-1.21-lts run fails on the first of
them, leaving one raw iron in the input chest.

The cost per craft is machine dependent: both tests succeed around tick
1750-2050 locally, while CI does not finish within 4000, completing five
to seven of the eight crafts, so roughly 570 to 800 ticks per craft
against a 200-tick vanilla smelt. The budget goes to 10000 ticks, which
covers the slowest run observed with room to spare. Passing tests are
unaffected, as succeedWhen stops as soon as the assertion holds.

That the tick cost varies with machine speed at all suggests crafting
progress is partly wall-clock bound, which is worth investigating
separately.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nb7EmAYd4R7RYWjmc17e6L
Comment thread src/main/java/org/cyclops/integratedcrafting/gametest/GameTestsItemsCraft.java Outdated
Comment thread src/main/java/org/cyclops/integratedcrafting/gametest/GameTestsItemsCraft.java Outdated
@rubensworks
rubensworks merged commit 23c8526 into master-1.21-lts Sep 17, 2026
3 checks passed
@rubensworks
rubensworks deleted the fix-furnace-gametest-timeout branch September 17, 2026 17:17
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