fix(generator): drop incorrect distinctness assert in TestPlanetRandomName #19
Reference in New Issue
Block a user
Delete Branch "feature/fix-flaky-planet-random-name"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
RandomNamebuilds the suffix as two independentrand.Intn(1000)calls, so the halves collide on ~0.1% of runs. The test assertedg[2] != g[3], which is a propertyRandomNamedoes not promise and does not need to (planet name collisions across planets are already tolerated bygenerate_game.go). Drop the assert; keep the format + class-prefix checks.#199 go-unit.yaml(collided on"0074").Test plan
go test ./game/internal/generator/ -run TestPlanetRandomName -count=200— 1400 sub-runs without a failure (prior version's flake probability would have surfaced ~once on average)