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

improve auto generated fullstack tests #3592

Merged
merged 8 commits into from
Dec 6, 2021

Conversation

lidezhu
Copy link
Contributor

@lidezhu lidezhu commented Dec 3, 2021

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:

What is changed and how it works?

remove some obsolete tests and add some fullstack test

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Dec 3, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JaySon-Huang

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 Dec 3, 2021
@lidezhu lidezhu changed the title improve auto generated fullstack tests [WIP] improve auto generated fullstack tests Dec 3, 2021
@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 Dec 3, 2021
@lidezhu lidezhu changed the title [WIP] improve auto generated fullstack tests improve auto generated fullstack tests Dec 3, 2021
@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 Dec 3, 2021
@lidezhu
Copy link
Contributor Author

lidezhu commented Dec 3, 2021

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Dec 3, 2021

Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/251/cobertura/
(Coverage detail url is limited office network access)

lines: 40.2% (44316 out of 110111)
branches: 5.6% (67029 out of 1197890)

@lidezhu lidezhu requested a review from JaySon-Huang December 3, 2021 05:21
@JaySon-Huang
Copy link
Contributor

@JaySon-Huang
Copy link
Contributor

Can you explain more about what's the difference between the old script and your new script?

@JaySon-Huang
Copy link
Contributor

Add tests/fullstack-test2/auto_gen/ to .gitignore

@lidezhu
Copy link
Contributor Author

lidezhu commented Dec 6, 2021

We can update it to python3 here?

https://github.com/pingcap/tics/blob/767cf9983fd5a9aaf58eb2a759e76b16d8d8c25e/tests/run-test.sh#L160

python2 is default installed by many OS, so I think using python2 is still better.

@lidezhu
Copy link
Contributor Author

lidezhu commented Dec 6, 2021

Can you explain more about what's the difference between the old script and your new script?

One of the most important motivation of the old script is to add some tests after tiflash support the pk_is_handle feature. So it tests all kinds of int type primary key with the same columns and the same operations.
For each kinds of primary key, it generates four test files which corresponding the following operations sequence: https://github.com/pingcap/tics/pull/3592/files#diff-f4ecbee0af8135c575a773fd118ebdb70f942d794387123f06c98916851937bbL449.
I think just test insert, update, delete operation on different primary key is enough. The four different operations sequence really make no difference. So the new script just keep one which is [INSERT, SELECT, UPDATE, SELECT, DELETE, SELECT].

The main improvements the new script covered can be summarized as follows:

  1. cover more data types;
  2. refactor the table result builder code;
  3. remove the tedious dml sequence;
  4. add dml tests cover cluster index type primary keys;

@lidezhu
Copy link
Contributor Author

lidezhu commented Dec 6, 2021

Add tests/fullstack-test2/auto_gen/ to .gitignore

Added.

Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 6, 2021
@JaySon-Huang
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and 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.

If you have any questions about the PR merge process, please refer to pr process.

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
Copy link
Member

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

Commit hash: 6c1bcbd

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 6, 2021
@sre-bot
Copy link
Collaborator

sre-bot commented Dec 6, 2021

Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/273/cobertura/
(Coverage detail url is limited office network access)

lines: 40.2% (44311 out of 110112)
branches: 5.6% (67023 out of 1197894)

@ti-chi-bot
Copy link
Member

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

@sre-bot
Copy link
Collaborator

sre-bot commented Dec 6, 2021

Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/276/cobertura/
(Coverage detail url is limited office network access)

lines: 40.3% (44434 out of 110200)
branches: 5.6% (67156 out of 1198208)

@ti-chi-bot ti-chi-bot merged commit 953dd99 into pingcap:master Dec 6, 2021
@JaySon-Huang JaySon-Huang deleted the improve-fullstack-test branch December 7, 2021 05:53
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/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants