Skip to content
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

test: fix error checking #59092

Merged
merged 3 commits into from
Jan 21, 2025
Merged

Conversation

D3Hunter
Copy link
Contributor

@D3Hunter D3Hunter commented Jan 21, 2025

What problem does this PR solve?

Issue Number: ref #57275

Problem Summary:

What changed and how does it work?

  • require.Error only checks that the error is not nil, if you want to check the error is some specific error, you need to use API like require.ErrorIs or ErrorContains

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/planner SIG: Planner labels Jan 21, 2025
Copy link

tiprow bot commented Jan 21, 2025

Hi @D3Hunter. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions 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.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 21, 2025
Makefile Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 21, 2025
Copy link

ti-chi-bot bot commented Jan 21, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-21 08:03:00.67795618 +0000 UTC m=+167908.008875584: ☑️ agreed by Leavrth.
  • 2025-01-21 08:03:58.070201079 +0000 UTC m=+167965.401120483: ☑️ agreed by hawkingrei.

Copy link
Contributor

@lance6716 lance6716 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add makefile target bazel_mirror_upload, it's easy to forget the exact command

where is this?

@D3Hunter
Copy link
Contributor Author

add makefile target bazel_mirror_upload, it's easy to forget the exact command

where is this?

reverted, just notice that you have add it before

Copy link
Member

@joccau joccau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.8534%. Comparing base (2e377f4) to head (4f07c2e).
Report is 7 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59092        +/-   ##
================================================
+ Coverage   73.0105%   74.8534%   +1.8429%     
================================================
  Files          1683       1729        +46     
  Lines        466027     474165      +8138     
================================================
+ Hits         340249     354929     +14680     
+ Misses       104830      96808      -8022     
- Partials      20948      22428      +1480     
Flag Coverage Δ
integration 48.8725% <0.0000%> (?)
unit 72.2446% <100.0000%> (+0.0370%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 61.0729% <ø> (+15.7754%) ⬆️

Copy link

ti-chi-bot bot commented Jan 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, joccau, Leavrth, tangenta, wjhuang2016, zanmato1984

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

The pull request process is described here

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

@ti-chi-bot ti-chi-bot bot added the approved label Jan 21, 2025
@ti-chi-bot ti-chi-bot bot merged commit c05646e into pingcap:master Jan 21, 2025
32 checks passed
@D3Hunter D3Hunter deleted the fix-testify-usage branch January 21, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants