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

owner_test (ticdc): fix unstable case TestHandleJobsDontBlock #3601

Merged
merged 17 commits into from
Nov 29, 2021

Conversation

asddongmen
Copy link
Contributor

@asddongmen asddongmen commented Nov 24, 2021

What problem does this PR solve?

fix unstable case TestHandleJobsDontBlock

https://ci2.pingcap.net/blue/organizations/jenkins/cdc_ghpr_leak_test/detail/cdc_ghpr_leak_test/12669/pipeline/

FAIL: owner_test.go:370: ownerSuite.TestHandleJobsDontBlock

[2021-11-24T02:47:07.376Z] 

[2021-11-24T02:47:07.376Z] owner_test.go:434:

[2021-11-24T02:47:07.376Z]     c.Assert(err, check.IsNil)

[2021-11-24T02:47:07.376Z] ... value *errors.withStack = context canceled ("context canceled")

What is changed and how it works?

  1. add a logLimiter field for Owner to limit log output instead of use time.sleep(), the latter will interferes this ut case.
  2. Make sure owner.tick will be called after statusProvider.GetAllChangeFeedInfo(ctx1) be called, otherwise the request will not be handle, so the ctx1 will timeout.

Check List

Tests

  • Unit test

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch

Release note

None

@asddongmen asddongmen requested a review from liuzix November 24, 2021 04:18
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Nov 24, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • hi-rustin
  • liuzix

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 Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 24, 2021
@asddongmen asddongmen changed the title owner_test: fix unstable case TestHandleJobsDontBlock owner_test(ticdc): fix unstable case TestHandleJobsDontBlock Nov 24, 2021
@asddongmen asddongmen changed the title owner_test(ticdc): fix unstable case TestHandleJobsDontBlock owner_test (ticdc): fix unstable case TestHandleJobsDontBlock Nov 24, 2021
@asddongmen asddongmen added area/ticdc Issues or PRs related to TiCDC. component/test Unit tests and integration tests component. labels Nov 24, 2021
Copy link
Contributor

@liuzix liuzix left a comment

Choose a reason for hiding this comment

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

Can you summarize the problem in the PR description?

cdc/owner/owner_test.go Outdated Show resolved Hide resolved
@liuzix
Copy link
Contributor

liuzix commented Nov 24, 2021

/run-leak-tests

Copy link
Contributor

@liuzix liuzix 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

cdc/owner/owner_test.go Outdated Show resolved Hide resolved
cdc/owner/owner_test.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2021

Codecov Report

Merging #3601 (2994946) into master (24030f8) will increase coverage by 1.5666%.
The diff coverage is 69.0981%.

@@               Coverage Diff                @@
##             master      #3601        +/-   ##
================================================
+ Coverage   56.5356%   58.1023%   +1.5666%     
================================================
  Files           211        241        +30     
  Lines         22798      24493      +1695     
================================================
+ Hits          12889      14231      +1342     
- Misses         8598       8839       +241     
- Partials       1311       1423       +112     

@asddongmen asddongmen requested a review from sdojjy November 24, 2021 05:01
cdc/owner/owner_test.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added status/LGT1 Indicates that a PR has LGTM 1. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Nov 24, 2021
Copy link
Member

@Rustin170506 Rustin170506 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

cdc/owner/owner_test.go Outdated Show resolved Hide resolved
@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 Nov 24, 2021
@asddongmen asddongmen added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 24, 2021
@ti-chi-bot
Copy link
Member

@sdojjy: 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.

@asddongmen asddongmen removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 24, 2021
cdc/owner/owner.go Outdated Show resolved Hide resolved
cdc/owner/owner.go Outdated Show resolved Hide resolved
@3AceShowHand
Copy link
Contributor

/run-kafka-integration-test

@asddongmen
Copy link
Contributor Author

/run-integration-tests

@3AceShowHand
Copy link
Contributor

/run-kafka-integration-test

cdc/owner/owner.go Outdated Show resolved Hide resolved
cdc/owner/owner.go Outdated Show resolved Hide resolved
Co-authored-by: Zixiong Liu <[email protected]>
@amyangfei
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: b8da81e

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 24, 2021
@liuzix
Copy link
Contributor

liuzix commented Nov 24, 2021

/run-integration-tests

@asddongmen
Copy link
Contributor Author

/run-integration-tests
/run-kafka-tests

@ti-chi-bot
Copy link
Member

@asddongmen: 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.

@ti-chi-bot ti-chi-bot merged commit f3d7d9a into pingcap:master Nov 29, 2021
okJiang pushed a commit to okJiang/tiflow that referenced this pull request Dec 8, 2021
asddongmen added a commit to ti-chi-bot/tiflow that referenced this pull request Dec 20, 2021
@asddongmen asddongmen deleted the fix_TestHandleJobsDontBlock branch December 22, 2021 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ticdc Issues or PRs related to TiCDC. component/test Unit tests and integration tests component. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 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.

8 participants