compute: move long test modules out of line - #38394
Open
antiguru wants to merge 1 commit into
Open
Conversation
Several modules in `mz-compute` carry test modules many times the size of the production code they cover, so the file has to be scrolled past to read the code. The repository already has the out-of-line pattern in `src/cluster-controller`, where `#[cfg(test)] mod tests;` points at a sibling `tests.rs`. Record that as the convention for this crate, with a concrete threshold so it is decidable rather than a matter of taste. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several modules in
mz-computecarry test modules many times the size of the production code they cover, so the code has to be scrolled past to read.src/cluster-controlleralready uses the out-of-line pattern, where#[cfg(test)] mod tests;points at a siblingtests.rs. This records that as the crate convention, with a threshold so it is decidable rather than a matter of taste.Out-of-line tests still reach private items through
super::, so moving a module needs no visibility changes.Worth landing before #38386 and the seven PRs stacked on it, which follow this rule and between them move about 5,900 lines of in-file test modules out of line.