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: fix TestTaskError and TestMultiError flaky tests #2779

Merged
merged 8 commits into from
Sep 14, 2021

Conversation

Rustin170506
Copy link
Member

@Rustin170506 Rustin170506 commented Sep 9, 2021

What problem does this PR solve?

close https://github.com/pingcap/ticdc/issues/2469

What is changed and how it works?

In one case, it did happen that isCancelled was used to the next event before it was updated, and ErrCh immediately received an error, just as cancel was called during the execution of AddEvent, which is why I encountered this unstable test. I was able to reproduce the problem occasionally after increasing the number of events and limiting resources locally.

Check List

Tests

  • Unit test

Code changes

None

Side effects

None

Related changes

  • Need to cherry-pick to the release branch

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 9, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • amyangfei
  • 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 the release-note-none Denotes a PR that doesn't merit a release note. label Sep 9, 2021
@ti-chi-bot ti-chi-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 9, 2021
@Rustin170506 Rustin170506 marked this pull request as draft September 9, 2021 07:47
@ti-chi-bot ti-chi-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 9, 2021
@Rustin170506 Rustin170506 marked this pull request as ready for review September 9, 2021 09:03
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 9, 2021
Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

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

LGTM, could you check if we have handle context canceled error properly when we call AddEvent in other files?

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 10, 2021
@ben1009
Copy link
Contributor

ben1009 commented Sep 10, 2021

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

1 similar comment
@ben1009
Copy link
Contributor

ben1009 commented Sep 10, 2021

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

@Rustin170506
Copy link
Member Author

/hold

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 10, 2021
@ti-chi-bot ti-chi-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 13, 2021
@Rustin170506 Rustin170506 changed the title test: fix TestMultiError flaky test test: fix TestTaskError and TestMultiError flaky tests Sep 13, 2021
@Rustin170506
Copy link
Member Author

LGTM, could you check if we have handle context canceled error properly when we call AddEvent in other files?

@overvenus It looks like calls elsewhere will return this error directly.

@Rustin170506
Copy link
Member Author

@amyangfei @ben1009 I think it ready for review.
Could you please take a look? Thanks!

@Rustin170506
Copy link
Member Author

I have tested this many times by limiting resources to 1C locally and it works.

@Rustin170506
Copy link
Member Author

/unhold

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 13, 2021
@ti-chi-bot
Copy link
Member

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

Commit hash: b5fb17d

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 14, 2021
@amyangfei amyangfei added 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. needs-cherry-pick-release-5.1 Should cherry pick this PR to release-5.1 branch. needs-cherry-pick-release-5.2 Should cherry pick this PR to release-5.2 branch. labels Sep 14, 2021
@amyangfei amyangfei added this to the v5.3.0 milestone Sep 14, 2021
@Rustin170506
Copy link
Member Author

/run-unit-tests

@Rustin170506
Copy link
Member Author

/run-kafka-tests

@Rustin170506
Copy link
Member Author

/run-integration-tests

@Rustin170506
Copy link
Member Author

/run-kafka-tests

@Rustin170506
Copy link
Member Author

/run-integration-tests

@Rustin170506
Copy link
Member Author

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

@Rustin170506
Copy link
Member Author

/run-all-tests

@codecov-commenter
Copy link

Codecov Report

Merging #2779 (3795a2e) into master (11e574c) will increase coverage by 1.5274%.
The diff coverage is 55.4627%.

@@               Coverage Diff                @@
##             master      #2779        +/-   ##
================================================
+ Coverage   55.3406%   56.8681%   +1.5274%     
================================================
  Files           164        180        +16     
  Lines         19754      18877       -877     
================================================
- Hits          10932      10735       -197     
+ Misses         7790       7174       -616     
+ Partials       1032        968        -64     

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

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. 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. needs-cherry-pick-release-5.1 Should cherry pick this PR to release-5.1 branch. needs-cherry-pick-release-5.2 Should cherry pick this PR to release-5.2 branch. 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. 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.

unit test workerPoolSuite.TestMultiError is not stable
7 participants