-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Add a unit test for *bucketBuffer.Range #21025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: nwnt The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted filessee 22 files with indirect coverage changes @@ Coverage Diff @@
## main #21025 +/- ##
==========================================
- Coverage 69.15% 69.12% -0.04%
==========================================
Files 422 422
Lines 34841 34841
==========================================
- Hits 24094 24083 -11
- Misses 9346 9359 +13
+ Partials 1401 1399 -2 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
2ae8ab1 to
7eb38a6
Compare
|
The lint error is now fixed. |
|
Tests should cover whole range execution, not just rangeLimit function that will be might not be used in the future. For regression testing you want to run as high level test as possible to prove that changing implementation below doesn't change the output. |
|
Yep, I can add the whole tests for range. Thought I was going to start adding them one by one to keep the PRs small, but I can do that too. |
|
We don't do testing to hardcode the reverse behavior of functions, we use them to prevent regressions. While doing small steps and small PRs is very good, we need to remember the goal test that ensures that the behavior of limit in range will not change. This test doesn't achieve this. |
|
Totally understood. Still working on the unit tests for the Range function and will be sending that shortly. |
7eb38a6 to
a07c5ba
Compare
a07c5ba to
f65fb69
Compare
|
@serathius this should look better this time. I believe server's Range ultimately calls Feel free to leave any comments. |
f65fb69 to
7db9d95
Compare
Signed-off-by: Nont <[email protected]>
7db9d95 to
67d8714
Compare
|
@nwnt: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Bucket buffer is just a buffer for a operations that have not been committed. While testing range should cover this buffer again testing it by itself is not enough |
Adding a small unit test as a small start step for #20386
cc @serathius @joshjms