Repository navigation
Add unit test coverage for vsetMemUsage(), vsetClear() and vsetIsValid() - #4341
Conversation
…id() Add three TEST_F(VsetTest, ...) cases covering the public vset APIs that previously lacked direct unit test coverage: - TestVsetMemUsage: verifies memory reporting across all reachable bucket encodings (NONE, SINGLE, VECTOR, RAX with one bucket, RAX with multiple buckets). No top-level HT test (unreachable by construction). - TestVsetClear: verifies clearing an empty set is safe, clearing a populated set makes it empty, entries survive clear (caller owns them), and vsetRelease makes vsetIsValid return false. - TestVsetIsValid: verifies an uninitialized zeroed set returns false, initialized returns true, populated returns true, released returns false, and re-initialized returns true. Also fix a GCC-only -fno-var-tracking-assignments flag in CMakeLists.txt that breaks Clang builds. Fixes valkey-io#4329 Co-authored-by: atlarix-agent <agent@atlarix.dev> Signed-off-by: Amariah Kamau <110414493+AmariahAK@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughChangesvset validation and build configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@valkey-review-bot please review this PR and also the makefile change which I am not sure why it was required |
|
The vset tests match the public API contracts. I also checked the CMake change: it mirrors the existing compiler gate in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #4341 +/- ##
============================================
+ Coverage 76.85% 76.92% +0.06%
============================================
Files 162 162
Lines 81566 81628 +62
============================================
+ Hits 62689 62791 +102
+ Misses 18877 18837 -40
🚀 New features to boost your workflow:
|
Description
All 13 tests pass (10 existing + 3 new).
Fixes #4329