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(ticdc): Migrate several test cases to testify #4199

Merged
merged 12 commits into from
Jan 26, 2022

Conversation

zhaoxinyu
Copy link
Contributor

@zhaoxinyu zhaoxinyu commented Jan 4, 2022

What problem does this PR solve?

Issue Number: close #2901
Issue Number: close #2902
Issue Number: close #4200

What is changed and how it works?

  1. Migrate test cases under cdc/owner, cdc/processor and pkg/orchestrator.
  2. Add test case for call back function in feedStateManager.handleError().

Check List

Tests

  • Unit test

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 4, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • asddongmen
  • 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 release-note-none Denotes a PR that doesn't merit a release note. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 4, 2022
@@ -514,6 +514,9 @@ func (c *changefeed) asyncExecDDL(ctx cdcContext.Context, job *timodel.Job) (don
func (c *changefeed) updateStatus(currentTs int64, checkpointTs, resolvedTs model.Ts) {
c.state.PatchStatus(func(status *model.ChangeFeedStatus) (*model.ChangeFeedStatus, bool, error) {
changed := false
if status == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

any ut cover the change?

@@ -149,6 +149,9 @@ func (m *feedStateManager) handleAdminJob() (jobsPending bool) {
m.patchState(model.StateNormal)
// remove error history to make sure the changefeed can running in next tick
m.state.PatchInfo(func(info *model.ChangeFeedInfo) (*model.ChangeFeedInfo, bool, error) {
if info == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

any ut for the change?

@ben1009
Copy link
Contributor

ben1009 commented Jan 4, 2022

[2022-01-04T03:13:27.457Z] FAIL github.com/pingcap/tiflow/pkg/orchestrator 40.315s

@zhaoxinyu
Copy link
Contributor Author

zhaoxinyu commented Jan 4, 2022

[2022-01-04T03:13:27.457Z] FAIL github.com/pingcap/tiflow/pkg/orchestrator 40.315s

The test failure is caused by accessing a removed test dir. I have fixed it.

@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 4, 2022
@ben1009
Copy link
Contributor

ben1009 commented Jan 5, 2022

seems the fail test is fixing #4175

@zhaoxinyu
Copy link
Contributor Author

seems the fail test is fixing #4175

I will add unit tests for the aforementioned callback functions and trigger the dm-unit-test again.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 16, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2022

Codecov Report

Merging #4199 (fabed46) into master (ab62e6b) will decrease coverage by 0.1283%.
The diff coverage is 45.8152%.

Flag Coverage Δ
cdc 59.2691% <54.5082%> (-0.3468%) ⬇️
dm 52.1097% <38.5925%> (+0.0441%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@@               Coverage Diff                @@
##             master      #4199        +/-   ##
================================================
- Coverage   55.5183%   55.3900%   -0.1284%     
================================================
  Files           495        495                
  Lines         61151      61280       +129     
================================================
- Hits          33950      33943         -7     
- Misses        23789      23935       +146     
+ Partials       3412       3402        -10     

@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 20, 2022
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 25, 2022
@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 Jan 25, 2022
@overvenus
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 8458675

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ 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
6 participants