Commit Graph

4 Commits

Author SHA1 Message Date
Houmgaor
d0efc4e81a test(channelserver): replace time.Sleep with polling loops
Blind sleeps accumulate serially (no t.Parallel anywhere) and inflate
under the race detector's scheduling overhead — contributing to the
~136s channelserver test run time.

Replace ~75 arbitrary sleeps (50ms–1s) across 7 test files with 2s
polling loops that exit as soon as the expected condition holds. Sleeps
that are genuinely intentional (race-condition stress tests, cache
expiry, temporal spacing in timestamp tests, backpressure pacing) are
left untouched.
2026-03-23 10:57:01 +01:00
Houmgaor
48639942f6 style: run gofmt across entire codebase
330 non-vendor files had minor formatting inconsistencies
(comment alignment, whitespace). No logic changes.
2026-02-23 21:28:30 +01:00
Houmgaor
0a489e7cc5 fix(channelserver): fix flaky integration tests from 3 isolation issues
- testhelpers_db: retry truncateAllTables up to 3 times on deadlock,
  which occurs when previous tests' goroutines still hold DB connections
- handlers_rengoku_integration_test: restore rengoku_score table after
  TestRengokuData_SaveOnDBError drops it, preventing cascading failures
  in all subsequent rengoku tests
- client_connection_simulation_test: fix TestClientConnection_PacketDuringLogout
  to accept both race outcomes (save-wins or logout-wins) since both
  handlers independently load from DB and last-writer-wins is valid
2026-02-21 00:28:27 +01:00
Houmgaor
433de4e21d fix(rengoku): prevent Sky Corridor race condition from wiping skill data (#85)
The client's Sky Corridor area transition handler saves rengoku data
before the load response is parsed into the character data area,
producing saves with zeroed skill fields but preserved point totals.

Detect this pattern server-side and merge existing skill data from the
database. Also reject sentinel-zero saves when valid data already exists.
2026-02-18 18:10:34 +01:00