test: raise btree/common coverage 85.3% -> 87.7%, fix stale Codecov slug - #307
Merged
Merged
Conversation
go.yml uploaded coverage to slug: SharedCode/sop and the README badge linked the same old project - a leftover from the joltrin rebrand that every other badge in the README already picked up. The badge was pointing at a stale/wrong Codecov project regardless of the actual coverage percentage.
…ates Cursor.AddIfNotExist/Upsert/Update/UpdateKey/Remove/FindWithID/ FindInDescendingOrder/UpdateCurrentItem/UpdateCurrentKey/GetCurrentItem/ GetCurrentItemNoLock, and the matching btreeWithTransaction wrapper methods (not-begun, non-writer, delegated-error, and success paths), were previously untested. Raises this repo's core-package coverage from 85.3% to 87.0%.
…tree cursor openers GetStores and CommitMaxDuration were only ever exercised through their underlying dependency directly, never through the wrapper method itself. CursorOnOpenedBtree and OpenBtreeCursor (both 0%) needed their nil-transaction/not-begun/empty-name/not-found precondition branches plus the already-open and fetch-from-StoreRepository success paths.
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.
Summary
Progress toward 100% coverage on the four packages Codecov measures (
btree,inmemory,fs,common), plus a real bug fix found along the way.go.ymluploaded coverage toslug: SharedCode/sop(the pre-rebrand repo name) instead ofSharedCode/joltrin; the README badge had the same stale link. Every other badge in the README already pointed atjoltrin- this one didn't get updated. Badge may have been broken/pointing at the wrong Codecov project regardless of the coverage percentage.btree.Cursor's untested delegate methods (AddIfNotExist,Upsert,Update,UpdateKey,Remove,FindWithID,FindInDescendingOrder,UpdateCurrentItem,UpdateCurrentKey,GetCurrentItem,GetCurrentItemNoLock), the matchingbtreeWithTransactionwrapper methods (not-begun/non-writer/delegated-error/success paths for each),common.Transaction.GetStores/CommitMaxDuration, andcommon.CursorOnOpenedBtree/OpenBtreeCursor(both fully untested).Honest status on "100%"
Not there. What's left is concentrated in two places:
common/transactionlogger.go(e.g.resurrectPriorityLogLocksat 36.4%,waitForCoordinatorReleaseat 53.8%) andcommon/twophasecommittransaction2.go(e.g.processPriorityRollbackOnRestartat 22.2%) - these need real understanding of the two-phase-commit recovery paths to test correctly, not quick wins. Rushing these risks shallow tests that pass without actually proving the recovery logic works.if err != nilbranches infs/(file I/O, erasure coding) that are borderline untestable without fault-injection scaffolding that doesn't exist yet.I stopped at a clean, fully-green checkpoint rather than pushing further into #1 without slowing down to do it right. Happy to continue in a follow-up if you want to keep going.
Test plan
go test ./inmemory/... ./btree/... ./common/... ./fs/... -count=1- all green