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

planner: split test data from test cases #12091

Merged
merged 4 commits into from
Sep 10, 2019
Merged

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented Sep 9, 2019

What problem does this PR solve?

When there is a change that affects lots of test cases in planner, it is very diffcult to update the test cases.

What is changed and how it works?

Split test data from test logic so we can generate test cases by one command:go test --record.
This PR uses TestIndexHint as a sample. We can split more tests once the test framework is settled.

Check List

Tests

  • No code

Code changes

  • None

Side effects

  • None

Related changes

  • None

Release note

  • None

@codecov
Copy link

codecov bot commented Sep 9, 2019

Codecov Report

Merging #12091 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #12091   +/-   ##
===========================================
  Coverage   81.4675%   81.4675%           
===========================================
  Files           449        449           
  Lines         96080      96080           
===========================================
  Hits          78274      78274           
  Misses        12222      12222           
  Partials       5584       5584

@alivxxx alivxxx requested a review from winoros September 9, 2019 09:26
{
"name": "TestIndexHint",
"cases": [
// simple case
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the json file support comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, so before parse, the comment will be removed.

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

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

lgtm

@winoros winoros added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 9, 2019
Copy link
Contributor

@lzmhhh123 lzmhhh123 left a comment

Choose a reason for hiding this comment

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

LGTM.

@alivxxx alivxxx added status/LGT2 Indicates that a PR has LGTM 2. status/can-merge Indicates a PR has been approved by a committer. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 10, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Sep 10, 2019

Your auto merge job has been accepted, waiting for #12109

@sre-bot
Copy link
Contributor

sre-bot commented Sep 10, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Sep 10, 2019

@lamxTyler merge failed.

@alivxxx
Copy link
Contributor Author

alivxxx commented Sep 10, 2019

/run-unit-test

@alivxxx alivxxx merged commit e6e3e63 into pingcap:master Sep 10, 2019
@alivxxx alivxxx deleted the split-test branch September 10, 2019 07:30
alivxxx added a commit to alivxxx/tidb that referenced this pull request Sep 27, 2019
alivxxx added a commit to alivxxx/tidb that referenced this pull request Sep 27, 2019
alivxxx added a commit to alivxxx/tidb that referenced this pull request Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test 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.

4 participants