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: check leader not ready in test #8380

Merged
merged 4 commits into from
Jul 11, 2024
Merged

Conversation

okJiang
Copy link
Member

@okJiang okJiang commented Jul 9, 2024

What problem does this PR solve?

Issue Number: Ref #8350

It will be panic if leader is empty

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

Release note

None.

@ti-chi-bot ti-chi-bot bot added dco-signoff: yes Indicates the PR's author has signed the dco. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 9, 2024
Copy link

codecov bot commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.16%. Comparing base (bdbe73e) to head (52261ec).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8380      +/-   ##
==========================================
- Coverage   77.32%   77.16%   -0.16%     
==========================================
  Files         470      470              
  Lines       61687    61689       +2     
==========================================
- Hits        47701    47604      -97     
- Misses      10405    10493      +88     
- Partials     3581     3592      +11     
Flag Coverage Δ
unittests 77.16% <ø> (-0.16%) ⬇️

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

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 10, 2024
@okJiang
Copy link
Member Author

okJiang commented Jul 10, 2024

/cc @lhy1024

@ti-chi-bot ti-chi-bot bot requested a review from lhy1024 July 10, 2024 06:18
@@ -78,6 +78,7 @@ func (suite *resourceManagerClientTestSuite) SetupSuite() {
suite.client, err = pd.NewClientWithContext(suite.ctx, suite.cluster.GetConfig().GetClientURLs(), pd.SecurityOption{})
re.NoError(err)
leader := suite.cluster.GetServer(suite.cluster.WaitLeader())
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to check whether suite.cluster.WaitLeader() is empty?

Copy link
Member Author

Choose a reason for hiding this comment

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

leader will be nil and be checked in L81

Copy link
Contributor

ti-chi-bot bot commented Jul 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HuSharp, lhy1024

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 11, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 11, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-10 02:02:09.295842448 +0000 UTC m=+409426.531076550: ☑️ agreed by HuSharp.
  • 2024-07-11 03:06:32.440398321 +0000 UTC m=+499689.675632434: ☑️ agreed by lhy1024.

@ti-chi-bot ti-chi-bot bot merged commit 9eab28f into tikv:master Jul 11, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants