Skip to content

migrate: switch server test dependency from net.minestom:testing to Cyano #179

@TheMeinerLP

Description

@TheMeinerLP

Description

The server module currently uses the upstream Minestom testing module (net.minestom:testing) for its test harness. The team maintains its own test framework — Cyano (net.onelitefeather:cyano, see OneLiteFeatherNET/Cyano) — which is the preferred replacement, delivered via the Mycelium BOM.

API surface change (minimal):

Before After
@EnvTest (upstream annotation) @ExtendWith(MicrotusExtension.class)
testImplementation(libs.minecraft.minestom.testing) Cyano via Mycelium BOM

The Env interface (net.minestom.testing.Env) remains the same — test bodies need no logic changes, only the class-level annotation changes.

Affected Files

  • settings.gradle.kts — version catalog entry minecraft.minestom.testing (line 25); add Cyano + Mycelium BOM entries
  • server/build.gradle.kts — replace testImplementation(libs.minecraft.minestom.testing) with Cyano dependency
  • 15 test files under server/src/test/ that carry @EnvTest:
    • net/elytrarace/server/VoyagerServerTest.java
    • net/elytrarace/server/ecs/GameEntityFactoryTest.java
    • net/elytrarace/server/ecs/component/HudComponentTest.java
    • net/elytrarace/server/ecs/system/ElytraPhysicsSystemTest.java
    • net/elytrarace/server/ecs/system/FireworkBoostSystemTest.java
    • net/elytrarace/server/ecs/system/OutOfBoundsSystemTest.java
    • net/elytrarace/server/ecs/system/RingCollisionSystemTest.java
    • net/elytrarace/server/ecs/system/RingEffectSystemTest.java
    • net/elytrarace/server/game/GameLoopSystemTest.java
    • net/elytrarace/server/game/GameOrchestratorTest.java
    • net/elytrarace/server/perf/EcsGameLoopLoadTest.java
    • net/elytrarace/server/phase/MinestomEndPhaseRankingTest.java
    • net/elytrarace/server/player/PlayerServiceTest.java
    • net/elytrarace/server/scoring/ScoringServiceTest.java
    • net/elytrarace/server/world/AnvilMapInstanceServiceTest.java

Acceptance Criteria

  • settings.gradle.kts version catalog declares the Cyano library (via Mycelium BOM or explicit coordinates); minecraft.minestom.testing is removed or kept only if still required by another module
  • server/build.gradle.kts uses Cyano as testImplementation instead of libs.minecraft.minestom.testing
  • All 15 @EnvTest annotations are replaced with @ExtendWith(MicrotusExtension.class) (import: net.minestom.testing.extension.MicrotusExtension)
  • ./gradlew :server:test passes with zero failures after migration
  • CLAUDE.md is updated to document the Cyano testing pattern (replace any mention of @EnvTest / minestom.testing with the new pattern)

Technical Details

  • Cyano coordinates: net.onelitefeather:cyano (check Mycelium BOM for the exact version pin)
  • Env interface stays at net.minestom.testing.Env — no changes to test method signatures or injection points
  • The version catalog in this project is defined programmatically in settings.gradle.kts under dependencyResolutionManagement { versionCatalogs { ... } } — do NOT create gradle/libs.versions.toml
  • The existing aonyx-bom (net.onelitefeather:aonyx-bom:0.7.0) is already declared; check whether the Mycelium BOM is a separate artifact or already transitively included

Dependencies

None — this is a test-scope change only and does not affect production classpath or runtime behavior.

Estimate

S — mechanical find-and-replace across 15 files plus two build files; no logic changes required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreMaintenance task with no user-facing changerefactorCode restructuring without behavior changetestingTests and quality assurance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions