Repository navigation
Code-review test additions - #8208
Merged
labkey-jeckels merged 1 commit intoOct 20, 2026
Merged
Conversation
8 tasks done
labkey-jeckels
merged commit Oct 20, 2026
b6bc712
into
fb_collapse_cache_commit_tasks
1 check passed
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.
Rationale
Filling some testing gaps found by Claude:
is built with this. But only the string-keyed unit tests exercise pruning. If either side started passing getCache() or the wrapper instead, every removal would stop dropping reloads, and no test would fail. Suggested test
in DatabaseCache.TestCase, using a BlockingDatabaseCache with a counting loader:
untested before the PR, but this PR rewrites that path. Two asserts after transaction.commit() would cover it: the shared cache has maxSize keys, and the loader call count is right.
unchanged would lock that in.
remove() has no test. It would take three lines in CacheReplayCommitTask.TestCase.
calls task.reload(...) on the same task would pin the copy that prevents a ConcurrentModificationException. Without it, a later "simplification" that drops the copy would pass every test.