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) #1944

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #1916

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

@ti-chi-bot ti-chi-bot added do-not-merge/cherry-pick-not-approved status/ptal Could you please take a look? size/S Denotes a PR that changes 10-29 lines, ignoring generated files. component/test Unit tests and integration tests component. type/cherry-pick-for-release-5.0 This PR is cherry-picked to release-5.0 from a source PR. labels Jun 5, 2021
@ti-chi-bot ti-chi-bot requested a review from lonng June 5, 2021 01:09
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 5, 2021
@amyangfei amyangfei added this to the v5.0.3 milestone Jun 5, 2021
@lonng lonng added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Jun 5, 2021
@ti-chi-bot
Copy link
Member Author

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • amyangfei
  • lonng

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 5, 2021
@lonng
Copy link
Contributor

lonng commented Jun 5, 2021

/merge

@ti-chi-bot
Copy link
Member Author

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

Commit hash: b4e5854

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 5, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #1944 (b4e5854) into release-5.0 (a1067a0) will increase coverage by 0.0242%.
The diff coverage is n/a.

@@                 Coverage Diff                 @@
##           release-5.0      #1944        +/-   ##
===================================================
+ Coverage      53.8503%   53.8746%   +0.0242%     
===================================================
  Files              155        155                
  Lines            16479      16479                
===================================================
+ Hits              8874       8878         +4     
- Misses            6655       6656         +1     
+ Partials           950        945         -5     

@ti-chi-bot ti-chi-bot merged commit 2941eb3 into pingcap:release-5.0 Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. component/test Unit tests and integration tests component. 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? type/cherry-pick-for-release-5.0 This PR is cherry-picked to release-5.0 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants