Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The big ol' compedium of flaky tests #1373

Open
SquidDev opened this issue Mar 14, 2023 · 2 comments
Open

The big ol' compedium of flaky tests #1373

SquidDev opened this issue Mar 14, 2023 · 2 comments
Labels
area-Minecraft This affects CC's Minecraft-specific content. bug A problem or unexpected behaviour with the mod.

Comments

@SquidDev
Copy link
Member

SquidDev commented Mar 14, 2023

CC:T's test suite is incredibly flaky when run via CI. I think this is just a limitation of how powerful the runners are (they work fine on my machine!) - but having to rerun every third build gets old quickly.

This issue is an attempt to track recent tests failures.

Gametests fail due to timeout

Builds

Notes

In 2243, the test batch was created at 09:21:22 and finally started running at 09:21:25 (this is 3s for a single tick, which is Bad(TM)). Computers continue to turn on until 09:21:28, and then tests time out at 09:21:29 (after 150 ticks). There's two odd things here:

  • Computers really shouldn't take 3 seconds to all turn on - we're using the fake Kotlin machine here, which has very little startup overhead.
  • Tests time out after 150 ticks, which should take 7.5s, but only appears to be 4s. Unless Minecraft is skipping ticks here or something - maybe we should add some logging here just for debugging?

modem_test.have_peripherals.modem_test.have_peripherals

Starts with peripherals ==> 
 expected: <[monitor_0, printer_0, right]> 
  but was: <[right]> at 4,-58,22 (relative: 4,2,2) (t=1)

Builds

inventory_test.fails_on_full.inventory_test.fails_on_full

No peripheral: minecraft:furnace_0 at 47,-58,11 (relative: 2,2,1) (t=1)

Builds

modem_test.full_modems_form_networks.modem_test.full_modems_form_networks

On the same network ==> expected: <dan200.computercraft.impl.network.wired.WiredNetworkImpl@554b3d66> but was: <dan200.computercraft.impl.network.wired.WiredNetworkImpl@c4809f9>

Builds

turtle_test.peripheral_change.turtle_test.peripheral_change failed

expected: <[(peripheral_detach, right), (peripheral, right)]> 
 but was: <[(peripheral_detach, right)]>

Builds

@SquidDev SquidDev added bug A problem or unexpected behaviour with the mod. area-Minecraft This affects CC's Minecraft-specific content. labels Mar 14, 2023
@SquidDev SquidDev pinned this issue Mar 14, 2023
@a2937
Copy link

a2937 commented Oct 19, 2024

Pardon me, but where does the tests live and how do you run it?

@SquidDev
Copy link
Member Author

The game tests live in the projects/common/src/testMod folder and can be run with ./gradlew runGametest.

The contributing and architecture docs have a little more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Minecraft This affects CC's Minecraft-specific content. bug A problem or unexpected behaviour with the mod.
Projects
None yet
Development

No branches or pull requests

2 participants