Skip to content

fix TestKVGet skip masking non-stream coverage#21748

Merged
serathius merged 1 commit into
etcd-io:mainfrom
Jefftree:fix-rangestream-skip
May 14, 2026
Merged

fix TestKVGet skip masking non-stream coverage#21748
serathius merged 1 commit into
etcd-io:mainfrom
Jefftree:fix-rangestream-skip

Conversation

@Jefftree
Copy link
Copy Markdown
Member

@Jefftree Jefftree commented May 13, 2026

Stream subtest should only skip on stream=true instead of unconditionally, this was a regression caused by my rangestream change.

In the meantime, #21227 merged without the test running due to the regression. There are two incorrect tests that need to be updated.

Discovered while working on #21747

Using the values before as the source of truth: a516127, manually verified 2 test failures.

  1. reversedKvs := []*mvccpb.KeyValue{kvFop, kvFooAbc, kvFoo, kvC, kvB, kvA}

"all KVs with maximum mod revision, sorted by key descending" -> []*mvccpb.KeyValue{kvB, kvA}

This should be reversedKVs[4:] instead of reveresdKVs[:2]

  1. allKvs := []*mvccpb.KeyValue{kvA, kvB, kvC, kvFoo, kvFooAbc, kvFop}
    kvsByValueDesc := []*mvccpb.KeyValue{kvFop, kvFoo, kvC, kvA, kvB, kvFooAbc}

"all KVs with maximimum create revision, sorted by value" -> []*mvccpb.KeyValue{kvFoo, kvC, kvA, kvB}

allKvs[:4] doesn't sort by value. kvsByValueDesc[1:5] has this sorted.

…e wantResponses

Signed-off-by: Jefftree <jeffrey.ying86@live.com>
@Jefftree Jefftree force-pushed the fix-rangestream-skip branch from 03d7766 to 5efa4a8 Compare May 13, 2026 23:25
@Jefftree
Copy link
Copy Markdown
Member Author

/cc @nwnt @serathius @fuweid

@k8s-ci-robot k8s-ci-robot requested review from fuweid, nwnt and serathius May 13, 2026 23:43
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.39%. Comparing base (9c420df) to head (5efa4a8).

Additional details and impacted files

see 155 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #21748      +/-   ##
==========================================
+ Coverage   64.41%   69.39%   +4.98%     
==========================================
  Files         412      426      +14     
  Lines       34081    35215    +1134     
==========================================
+ Hits        21952    24437    +2485     
+ Misses      10595     9355    -1240     
+ Partials     1534     1423     -111     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c420df...5efa4a8. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@k8s-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jefftree, serathius

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@serathius serathius merged commit 3bdaa05 into etcd-io:main May 14, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants