Follow-up: extract peer_manager mod tests into peer_manager/tests.rs #120

Open
opened 2026-07-26 19:21:20 +00:00 by vxfemboy · 0 comments
vxfemboy commented 2026-07-26 19:21:20 +00:00 (Migrated from github.com)

After the peer_manager.rs module split (#11, PR #119), mod.rs is 3,503 lines — of which ~1,314 are production code (the plan's target, met) and ~2,188 are the integration-style tests that drive on_udp/tick end-to-end, left in mod.rs because they don't belong to a single concern file.

Follow-up (mechanical, zero behavior change): move mod.rs's #[cfg(test)] mod tests into peer_manager/tests.rs. Because tests.rs stays a descendant of peer_manager, use super::* still reaches mod.rs's private free-helpers and fields, and the concern files' pub(super) methods stay visible — no visibility changes needed. This brings mod.rs down to ~1,300 lines (production only).

Separately (larger, not mechanical): tick_dispatch is ~411 lines and holds the #116 escalation arm — a pre-existing size issue the split inherited, worth its own future refactor.

Surfaced by the whole-branch review of PR #119.

After the `peer_manager.rs` module split (#11, PR #119), `mod.rs` is 3,503 lines — of which ~1,314 are production code (the plan's target, met) and ~2,188 are the integration-style tests that drive `on_udp`/`tick` end-to-end, left in `mod.rs` because they don't belong to a single concern file. **Follow-up (mechanical, zero behavior change):** move `mod.rs`'s `#[cfg(test)] mod tests` into `peer_manager/tests.rs`. Because `tests.rs` stays a descendant of `peer_manager`, `use super::*` still reaches `mod.rs`'s private free-helpers and fields, and the concern files' `pub(super)` methods stay visible — no visibility changes needed. This brings `mod.rs` down to ~1,300 lines (production only). Separately (larger, not mechanical): `tick_dispatch` is ~411 lines and holds the #116 escalation arm — a pre-existing size issue the split inherited, worth its own future refactor. Surfaced by the whole-branch review of PR #119.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
femboy/yip#120
No description provided.