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

pipeline: fix unstable unit test (#1609) #1655

Merged
merged 3 commits into from
Apr 14, 2021

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Apr 13, 2021

cherry-pick #1609 to release-5.0
You can switch your code base to this Pull Request by using git-extras:

# In ticdc repo:
git pr https://github.com/pingcap/ticdc/pull/1655

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/ticdc.git pr/1655:release-5.0-cfe4dce4e883

What problem does this PR solve?

Fix unstable unit test found in https://github.com/pingcap/ticdc/issues/1501#issuecomment-812846556

[2021-04-02T16:20:07.344Z] [2021/04/03 00:17:07.593 +08:00] [ERROR] [pipeline.go:96] ["found error when running the node"] [name="error node"] [error="error node throw an error, index: 3"] [errorVerbose="error node throw an error, index: 3\ngithub.com/pingcap/ticdc/pkg/pipeline.(*errorNode).Receive\n\t/home/jenkins/agent/workspace/cdc_ghpr_test/go/src/github.com/pingcap/ticdc/pkg/pipeline/pipeline_test.go:197\ngithub.com/pingcap/ticdc/pkg/pipeline.(*nodeRunner).run\n\t/home/jenkins/agent/workspace/cdc_ghpr_test/go/src/github.com/pingcap/ticdc/pkg/pipeline/runner.go:60\ngithub.com/pingcap/ticdc/pkg/pipeline.(*Pipeline).driveRunner\n\t/home/jenkins/agent/workspace/cdc_ghpr_test/go/src/github.com/pingcap/ticdc/pkg/pipeline/pipeline.go:93\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357"] [stack="github.com/pingcap/ticdc/pkg/pipeline.(*Pipeline).driveRunner\n\t/home/jenkins/agent/workspace/cdc_ghpr_test/go/src/github.com/pingcap/ticdc/pkg/pipeline/pipeline.go:96"]
[2021-04-02T16:20:07.344Z] 
[2021-04-02T16:20:07.344Z] ----------------------------------------------------------------------
[2021-04-02T16:20:07.344Z] FAIL: pipeline_test.go:288: pipelineSuite.TestPipelineThrow
[2021-04-02T16:20:07.344Z] 
[2021-04-02T16:20:07.344Z] pipeline_test.go:284:
[2021-04-02T16:20:07.344Z]     n.c.Assert(n.index, check.Equals, 6)
[2021-04-02T16:20:07.344Z] ... obtained int = 4
[2021-04-02T16:20:07.344Z] ... expected int = 6
[2021-04-02T16:20:07.344Z] 
[2021-04-02T16:20:07.344Z] pipeline_test.go:316:
[2021-04-02T16:20:07.344Z]     c.Assert(len(errs), check.Equals, 4)
[2021-04-02T16:20:07.344Z] ... obtained int = 2
[2021-04-02T16:20:07.344Z] ... expected int = 4
[2021-04-02T16:20:07.344Z] 
[2021-04-02T16:20:07.344Z] OOPS: 3 passed, 1 skipped, 1 FAILED
[2021-04-02T16:20:07.344Z] --- FAIL: TestSuite (1.12s)
[2021-04-02T16:20:07.344Z] FAIL
[2021-04-02T16:20:07.344Z] coverage: 73.3% of statements
[2021-04-02T16:20:07.344Z] FAIL	github.com/pingcap/ticdc/pkg/pipeline	1.182s

What is changed and how it works?

Add one more check for the logic that send message to closed pipeline.

Check List

Tests

  • Unit test
  • Integration test

Release note

  • No release note

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot added status/ptal Could you please take a look? size/M Denotes a PR that changes 30-99 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 Apr 13, 2021
@ti-chi-bot ti-chi-bot requested a review from kennytm April 13, 2021 08:52
@ti-srebot ti-srebot added this to the v5.0.1 milestone Apr 13, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 13, 2021
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (release-5.0@0189b11). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 611b72e differs from pull request most recent head becfe8a. Consider uploading reports for the commit becfe8a to get more accurate results

@@               Coverage Diff                @@
##             release-5.0      #1655   +/-   ##
================================================
  Coverage               ?   52.6558%           
================================================
  Files                  ?        152           
  Lines                  ?      16059           
  Branches               ?          0           
================================================
  Hits                   ?       8456           
  Misses                 ?       6705           
  Partials               ?        898           

@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label Apr 13, 2021
@zier-one
Copy link
Contributor

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • amyangfei
  • leoppro

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 writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@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 Apr 14, 2021
@zier-one
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: df72b47

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 14, 2021
@ti-chi-bot ti-chi-bot merged commit 2ffe03c into pingcap:release-5.0 Apr 14, 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/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. 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.

6 participants