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

tests: make TestAllocIDAfterLeaderChange more stable #8558

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

HuSharp
Copy link
Member

@HuSharp HuSharp commented Aug 22, 2024

What problem does this PR solve?

Issue Number: Close #8557

What is changed and how does it work?

2024-08-22T02:33:09.9000891Z [2024/08/22 02:33:09.268 +00:00] [INFO] [server.go:1678] ["skip campaigning of pd leader and check later"] [server-name=pd2] [etcd-leader-id=16910137396250798226] [member-id=7914137599778630982]
2024-08-22T02:33:09.9002667Z     server_test.go:117: 
2024-08-22T02:33:09.9004241Z         	Error Trace:	/home/runner/work/pd/pd/tests/integrations/mcs/scheduling/server_test.go:117
2024-08-22T02:33:09.9005646Z         	Error:      	Received unexpected error:
2024-08-22T02:33:09.9006974Z         	            	rpc error: code = Unavailable desc = not leader
2024-08-22T02:33:09.9008239Z         	Test:       	TestServerTestSuite/TestAllocIDAfterLeaderChange
need to wait leader

Check List

Tests

  • Integration test

Release note

None.

Signed-off-by: husharp <ihusharp@gmail.com>
@ti-chi-bot ti-chi-bot bot added release-note-none dco-signoff: yes size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 22, 2024
@@ -106,6 +106,7 @@ func (suite *serverTestSuite) TestAllocIDAfterLeaderChange() {
pd2, err := suite.cluster.Join(suite.ctx)
re.NoError(err)
err = pd2.Run()
re.NotEmpty(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.

There are still some cases that are not judged empty, do we need also modify them or add comments?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added more waiting leaders for tests related to joining situation

Signed-off-by: husharp <ihusharp@gmail.com>
@HuSharp HuSharp requested a review from lhy1024 August 22, 2024 03:15
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.58%. Comparing base (c963e77) to head (e23dcb5).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8558      +/-   ##
==========================================
+ Coverage   77.56%   77.58%   +0.02%     
==========================================
  Files         474      474              
  Lines       61875    61877       +2     
==========================================
+ Hits        47994    48009      +15     
+ Misses      10344    10334      -10     
+ Partials     3537     3534       -3     
Flag Coverage Δ
unittests 77.58% <ø> (+0.02%) ⬆️

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

Copy link
Contributor

ti-chi-bot bot commented Aug 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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

Copy link
Contributor

ti-chi-bot bot commented Aug 22, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-22 03:17:01.488556142 +0000 UTC m=+408216.623006258: ☑️ agreed by lhy1024.
  • 2024-08-22 03:35:23.316186775 +0000 UTC m=+409318.450636897: ☑️ agreed by rleungx.

@ti-chi-bot ti-chi-bot bot merged commit 32829f1 into tikv:master Aug 22, 2024
21 checks passed
@HuSharp HuSharp deleted the make_alloc_stable branch August 22, 2024 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes lgtm release-note-none size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestAllocIDAfterLeaderChange is unstable
3 participants