Repository navigation
test(bdr): unit-test BDR cache accessors (closes #391) - #395
Merged
Merged
Conversation
gg582
added a commit
that referenced
this pull request
Oct 18, 2026
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.
What it does
Adds
tests/test_bdr_cache.ccovering the four cache accessors listed inscripts/ci/api-untested-baseline.txt:cwist_bdr_put_fixed+cwist_bdr_get— stores a fixed response; hit returns the same bytes and length; miss on an unregistered path returns NULL.cwist_bdr_get_pinned+cwist_bdr_unpin— pinned hit returns blob; blob stays readable while pin is held;cwist_bdr_unpin(NULL)does not crash; miss returns NULL with a NULL pin.cwist_bdr_set_limits— setsmax_bytessmaller than a test entry; asserts no crash on oversized put and on zero-value arguments.cwist_bdr_create()needs no server — the cache is standalone, per the header.How verified
Compiles and exits 0.
Exits 0; four names removed from
scripts/ci/api-untested-baseline.txt.What this does NOT do
Does not test concurrent or multi-threaded put paths (covered by the existing
test_bdr), disk-mode, or the revalidation hook.