Commit cdc83c4
committed
test: add comprehensive tests for critical components
Add tests for previously untested critical areas:
- QueueServerSelectorTest: Tests all load balancing strategies
(ROUND_ROBIN, LEAST_PLAYERS, RANDOM), edge cases like empty
servers, offline servers, and strategy changes
- ConfigMigratorTest: Tests V2 to V3 migration including
placeholder updates, queueServer to queueServers conversion,
and idempotent migration behavior
- ConfigTest: Tests getQueueType permission matching, queue type
ordering, findGroupByTarget case sensitivity, kickWhenDownServers
placeholder expansion, and queue group configuration
- MainCommandSharedTest: Tests command parsing, shadowban duration
parsing (d/h/m/s), permission checks, tab completion, and
documents the NumberFormatException bug with invalid durations
Also adds missing Config setters for testing:
- setServerName, setQueueLoadBalancing, setRawKickWhenDownServers1 parent 397c3e4 commit cdc83c4
5 files changed
Lines changed: 1384 additions & 0 deletions
File tree
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
598 | 610 | | |
599 | 611 | | |
600 | 612 | | |
| |||
0 commit comments