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

br/pkg/pdutil: migrate test-infra to testify #28315

Merged
merged 8 commits into from
Oct 6, 2021

Conversation

unconsolable
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #28175

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 24, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • kennytm
  • tisonkun

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added 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 Sep 24, 2021
ctx := context.Background()
func TestScheduler(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

defer cancel() to eliminate goroutine leak in pauseSchedulersAndConfigWith

go func() {
<-schedulerPauseCh
}()
err = pdController.resumeSchedulerWith(ctx, []string{scheduler}, mock)
Copy link
Contributor Author

@unconsolable unconsolable Sep 24, 2021

Choose a reason for hiding this comment

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

Add a resumeSchedulerWith to eliminate goroutine leak in last go func

Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @unconsolable ! Comments inline.

br/pkg/pdutil/pd_test.go Outdated Show resolved Hide resolved
br/pkg/pdutil/pd_test.go Outdated Show resolved Hide resolved
br/pkg/pdutil/pd_test.go Outdated Show resolved Hide resolved
br/pkg/pdutil/pd_test.go Show resolved Hide resolved
Signed-off-by: unconsolable <chenzhipeng2012@gmail.com>
Signed-off-by: unconsolable <chenzhipeng2012@gmail.com>
@tisonkun
Copy link
Contributor

@unconsolable I push a commit to run all tests in serial and enable failpoint to speed up the retry test. All tests is finished within 1 second and I think it is ok to run in serial so that we don't meet some special case.

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Contributor

/cc @kennytm

@ti-chi-bot ti-chi-bot requested a review from kennytm September 24, 2021 16:45
@tisonkun
Copy link
Contributor

/run-check_dev_2

@kennytm kennytm added the component/br This issue is related to BR of TiDB. label Sep 25, 2021
Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

rest LGTM

br/pkg/pdutil/pd_serial_test.go Outdated Show resolved Hide resolved
br/pkg/pdutil/pd_serial_test.go Show resolved Hide resolved
Co-authored-by: kennytm <kennytm@gmail.com>
Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

LGTM.

@kennytm your comments addressed.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 25, 2021
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 30, 2021
@unconsolable
Copy link
Contributor Author

/assign @kennytm
Could you please help on merging?

@kennytm
Copy link
Contributor

kennytm commented Oct 6, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 297058e

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Oct 6, 2021
@ti-chi-bot
Copy link
Member

@unconsolable: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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 ti-community-infra/tichi repository.

@tisonkun

This comment has been minimized.

@ti-chi-bot
Copy link
Member

@tisonkun: /merge cancel is only allowed for the PR author and the committers in list.

In response to this:

/merge cancel

@unconsolable please fix goleak checks. I think you can omit the function

[2021-10-06T14:10:44.179Z] goleak: Errors on successful test run: found unexpected goroutines:
[2021-10-06T14:10:44.179Z] [Goroutine 118 in state select, with go.opencensus.io/stats/view.(*worker).start on top of the stack:
[2021-10-06T14:10:44.179Z] goroutine 118 [select]:
[2021-10-06T14:10:44.179Z] go.opencensus.io/stats/view.(*worker).start(0xc00036fd00)
[2021-10-06T14:10:44.179Z] 	/nfs/cache/mod/go.opencensus.io@v0.23.0/stats/view/worker.go:276 +0xcd
[2021-10-06T14:10:44.179Z] created by go.opencensus.io/stats/view.init.0
[2021-10-06T14:10:44.179Z] 	/nfs/cache/mod/go.opencensus.io@v0.23.0/stats/view/worker.go:34 +0x68

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 ti-community-infra/tichi repository.

@tisonkun
Copy link
Contributor

tisonkun commented Oct 6, 2021

/run-check_dev_2

@ti-chi-bot ti-chi-bot merged commit 7fd6001 into pingcap:master Oct 6, 2021
@unconsolable unconsolable deleted the issue-28175 branch October 7, 2021 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/br This issue is related to BR of TiDB. 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. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

migrate test-infra to testify for br/pkg/pdutil
4 participants