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

openAPI (ticdc): add some unit tests and migrate related test to testify #4387

Merged
merged 10 commits into from
Jan 24, 2022

Conversation

asddongmen
Copy link
Contributor

@asddongmen asddongmen commented Jan 18, 2022

What problem does this PR solve?

Issue Number: ref #2411

What is changed and how it works?

  1. Add some unit tests for open API.
  2. Remove timeoutMiddleware from open API, because we think that how long a requests will time out should depend on the client rather than server.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change

Side effects

Related changes

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 18, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • ben1009
  • 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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 18, 2022
@asddongmen
Copy link
Contributor Author

/run-integration-tests

@asddongmen asddongmen added area/ticdc Issues or PRs related to TiCDC. component/status-server Status server component. type/enhancement This is a enhancement PR labels Jan 18, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 18, 2022

Codecov Report

Merging #4387 (53041db) into master (e469fb3) will increase coverage by 0.0251%.
The diff coverage is 36.1233%.

Flag Coverage Δ
cdc 60.2321% <31.3043%> (+0.0446%) ⬆️
dm 52.1161% <41.0714%> (+0.0125%) ⬆️

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

@@               Coverage Diff                @@
##             master      #4387        +/-   ##
================================================
+ Coverage   55.8077%   55.8329%   +0.0251%     
================================================
  Files           495        495                
  Lines         61246      61333        +87     
================================================
+ Hits          34180      34244        +64     
- Misses        23614      23649        +35     
+ Partials       3452       3440        -12     

@asddongmen
Copy link
Contributor Author

/run-integration-tests

@asddongmen asddongmen added the status/ptal Could you please take a look? label Jan 19, 2022
cdc/api/router_test.go Outdated Show resolved Hide resolved
cdc/api/router.go Outdated Show resolved Hide resolved
cdc/server.go Outdated Show resolved Hide resolved
@3AceShowHand
Copy link
Contributor

/run-all-tests

@asddongmen
Copy link
Contributor Author

/run-integration-tests

cdc/api/open.go Outdated Show resolved Hide resolved
cdc/http.go Outdated Show resolved Hide resolved
cdc/http.go Outdated Show resolved Hide resolved
cdc/server_test.go Outdated Show resolved Hide resolved
@asddongmen asddongmen changed the title openAPI (ticdc): add some unit tests openAPI (ticdc): add some unit tests and migrate related test to testify Jan 20, 2022
@zhaoxinyu
Copy link
Contributor

LGTM

@ti-chi-bot
Copy link
Member

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

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.

rest LGTM

cdc/api/owner.go Outdated Show resolved Hide resolved
cdc/api/open.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 21, 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 24, 2022
@asddongmen
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 53041db

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 24, 2022
@asddongmen
Copy link
Contributor Author

/run-verify

@asddongmen
Copy link
Contributor Author

/run-integration-tests /tidb=pr/30558
/run-kafka-integration-test /tidb=pr/30558

@asddongmen
Copy link
Contributor Author

/run-verify

@ti-chi-bot ti-chi-bot merged commit b196894 into pingcap:master Jan 24, 2022
@asddongmen asddongmen deleted the add_unit_test_for_openAPI branch June 7, 2022 08:48
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/status-server Status server component. 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. status/ptal Could you please take a look? type/enhancement This is a enhancement PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants