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: fix leak test in embeded etcd test #1916

Merged
merged 5 commits into from
Jun 5, 2021

Conversation

amyangfei
Copy link
Contributor

What problem does this PR solve?

Fix a leak in test from CI

[2021-06-02T11:43:34.661Z] ----------------------------------------------------------------------
[2021-06-02T11:43:34.661Z] FAIL: etcd_test.go:53: etcdSuite.TestEmbedEtcd
[2021-06-02T11:43:34.661Z] 
[2021-06-02T11:43:34.661Z] etcd_test.go:74:
[2021-06-02T11:43:34.661Z]     ...
[2021-06-02T11:43:34.661Z] /home/jenkins/agent/workspace/cdc_ghpr_leak_test/go/src/github.com/pingcap/ticdc/pkg/util/testleak/leaktest.go:162:
[2021-06-02T11:43:34.661Z]     c.Errorf("Test %s check-count %d appears to have leaked: %v", c.TestName(), cnt, g)
[2021-06-02T11:43:34.661Z] ... Error: Test etcdSuite.TestEmbedEtcd check-count 50 appears to have leaked: github.com/pingcap/ticdc/pkg/etcd.(*etcdSuite).SetUpTest.func1(0xc00022a4b0, 0xc00003f080)
[2021-06-02T11:43:34.661Z] 	/home/jenkins/agent/workspace/cdc_ghpr_leak_test/go/src/github.com/pingcap/ticdc/pkg/etcd/etcd_test.go:45 +0x6d
[2021-06-02T11:43:34.661Z] created by github.com/pingcap/ticdc/pkg/etcd.(*etcdSuite).SetUpTest
[2021-06-02T11:43:34.661Z] 	/home/jenkins/agent/workspace/cdc_ghpr_leak_test/go/src/github.com/pingcap/ticdc/pkg/etcd/etcd_test.go:44 +0x172
[2021-06-02T11:43:34.661Z] 
[2021-06-02T11:43:34.661Z] OOPS: 4 passed, 1 FAILED
[2021-06-02T11:43:34.661Z] --- FAIL: Test (28.03s)
[2021-06-02T11:43:34.661Z] FAIL
[2021-06-02T11:43:34.661Z] FAIL	github.com/pingcap/ticdc/pkg/etcd	28.104s

What is changed and how it works?

Remove the log error goroutine, log error when test shutdown

Check List

Tests

  • Unit test
  • Integration test

Release note

  • No release note

@amyangfei amyangfei added component/test Unit tests and integration tests component. needs-cherry-pick-release-4.0 Should cherry pick this PR to release-4.0 branch. needs-cherry-pick-release-5.0 Should cherry pick this PR to release-5.0 branch. labels Jun 2, 2021
@amyangfei amyangfei added this to the v5.0.3 milestone Jun 2, 2021
@ti-chi-bot ti-chi-bot requested review from zier-one and lonng June 2, 2021 12:09
@ti-chi-bot ti-chi-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 2, 2021
@amyangfei amyangfei added the status/ptal Could you please take a look? label Jun 2, 2021
@amyangfei
Copy link
Contributor Author

/run-all-tests

@amyangfei
Copy link
Contributor Author

/run-leak-tests

@ti-chi-bot
Copy link
Member

@ben1009: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

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.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 3, 2021
@amyangfei amyangfei modified the milestones: v5.0.3, v5.1.0 Jun 4, 2021
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • leoppro
  • overvenus

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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 4, 2021
@overvenus
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: e00afc9

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 4, 2021
@zier-one
Copy link
Contributor

zier-one commented Jun 4, 2021

/merge

@zier-one
Copy link
Contributor

zier-one commented Jun 4, 2021

/run-all-tests

@zier-one
Copy link
Contributor

zier-one commented Jun 5, 2021

/run-integration-tests

@codecov-commenter
Copy link

Codecov Report

Merging #1916 (183344c) into master (a1067a0) will increase coverage by 0.3891%.
The diff coverage is 67.3134%.

@@               Coverage Diff                @@
##             master      #1916        +/-   ##
================================================
+ Coverage   53.8503%   54.2395%   +0.3891%     
================================================
  Files           155        163         +8     
  Lines         16479      17325       +846     
================================================
+ Hits           8874       9397       +523     
- Misses         6655       6921       +266     
- Partials        950       1007        +57     

@ti-chi-bot ti-chi-bot merged commit 7f01111 into pingcap:master Jun 5, 2021
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #1943.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #1944.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test Unit tests and integration tests component. needs-cherry-pick-release-4.0 Should cherry pick this PR to release-4.0 branch. needs-cherry-pick-release-5.0 Should cherry pick this PR to release-5.0 branch. size/S Denotes a PR that changes 10-29 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. status/ptal Could you please take a look?
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants