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/cluster_test: make TestRegionStatistics more stable #8320

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

HuSharp
Copy link
Member

@HuSharp HuSharp commented Jun 21, 2024

What problem does this PR solve?

Issue Number: Close #8319

What is changed and how does it work?

Because this test has only 2 pd's and five ResignLeader times, whenever there is a network or disk problem will cause the lease to expire, and result in one more leader resigning.
And then there is a high probability of being recognized as frequent campaign times to transfer leader failed

Check List

Tests

  • Integration test

Release note

None.

@HuSharp HuSharp requested review from JmPotato and lhy1024 June 21, 2024 09:52
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 21, 2024
Signed-off-by: husharp <jinhao.hu@pingcap.com>
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jun 24, 2024
@@ -186,7 +186,7 @@ func TestRegionStatistics(t *testing.T) {
re := require.New(t)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
tc, err := tests.NewTestCluster(ctx, 2)
tc, err := tests.NewTestCluster(ctx, 3)
Copy link
Member

Choose a reason for hiding this comment

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

Why add a new server?

Copy link
Member Author

@HuSharp HuSharp Jun 24, 2024

Choose a reason for hiding this comment

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

Because this test has only 2 pd's and five ResignLeader times, whenever there is a network or disk problem(ci machine has a high probability) will cause the lease to expire, and result in one more leader resigning.
And then there is a high probability of being recognized as frequent campaign times to transfer leader failed

@ti-chi-bot ti-chi-bot bot added the lgtm label Jun 25, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nolouch, 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

@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 25, 2024
Copy link
Contributor

ti-chi-bot bot commented Jun 25, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-24 04:03:57.695514012 +0000 UTC m=+605964.181002844: ☑️ agreed by rleungx.
  • 2024-06-25 05:24:23.869363711 +0000 UTC m=+697190.354852543: ☑️ agreed by nolouch.

@ti-chi-bot ti-chi-bot bot merged commit 49c3b5a into tikv:master Jun 25, 2024
17 checks passed
@HuSharp HuSharp deleted the fix_flaky_region_test branch June 25, 2024 12:58
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestRegionStatistics is unstable
4 participants