Commit dc3641f
CBG-5784: move the channel cache tests into db/channelcachetest
Moves channel_cache_test.go, channel_cache_single_test.go and
channel_cache_latelog_test.go out of package db, so the channel cache can be
tested and its coverage measured on its own.
All 37 tests, 7 benchmarks and the fuzz target move; nothing stays behind.
Unlike the change cache, these three files are self-contained - compiling db's
remaining tests without them reports no undefined identifiers - so no helper
relocation was needed first. Test names are unchanged, 45 before and 45 after,
verified by name rather than by count.
The move is mechanical apart from edits the compiler cannot make safely: the
DatabaseCollectionWithUser literal carrying the unexported user field is
restructured around the existing setter, the eight user assignments use it too,
the change cache is reached through the database rather than the collection
router, and the two cache implementations are named through the aliases added
in the previous commit. The waitForCompaction helper is deleted in favour of
the accessor that absorbed it, which is why "time" leaves
channel_cache_test.go's imports - the only string literal that changes across
all three files.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent fd1c7aa commit dc3641f
4 files changed
Lines changed: 721 additions & 704 deletions
File tree
- db/channelcachetest
0 commit comments