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

meta, util: add unit tests #10054

Merged
merged 6 commits into from Apr 11, 2019

Conversation

Projects
None yet
6 participants
@zimulala
Copy link
Member

zimulala commented Apr 4, 2019

What problem does this PR solve?

Add unit tests.
Before this PR:
ok github.com/pingcap/tidb/meta 0.033s coverage: 76.9% of statements
Now:
ok github.com/pingcap/tidb/meta 0.040s coverage: 85.7% of statements

What is changed and how it works?

Add unit tests and tiny clean up.
Remove some useless functions like parseDatabaseID , parseTableID .

Check List

Tests

  • Unit test
@codecov

This comment has been minimized.

Copy link

codecov bot commented Apr 8, 2019

Codecov Report

❗️ No coverage uploaded for pull request base (master@ee99570). Click here to learn what that means.
The diff coverage is 100%.

@@             Coverage Diff             @@
##             master     #10054   +/-   ##
===========================================
  Coverage          ?   78.0576%           
===========================================
  Files             ?        405           
  Lines             ?      82106           
  Branches          ?          0           
===========================================
  Hits              ?      64090           
  Misses            ?      13318           
  Partials          ?       4698

@zimulala zimulala force-pushed the zimulala:meta-ut branch from 53379b7 to 03b0495 Apr 8, 2019

@zimulala

This comment has been minimized.

Copy link
Member Author

zimulala commented Apr 8, 2019

/run-all-tests

@zimulala

This comment has been minimized.

Copy link
Member Author

zimulala commented Apr 8, 2019

/run-common-test

@zimulala

This comment has been minimized.

Copy link
Member Author

zimulala commented Apr 9, 2019

@XuHuaiyu
Copy link
Contributor

XuHuaiyu left a comment

LGTM

@XuHuaiyu XuHuaiyu added the status/LGT1 label Apr 9, 2019

@zz-jason
Copy link
Member

zz-jason left a comment

LGTM

}

return nil
return errors.Trace(err)

This comment has been minimized.

Copy link
@zz-jason

zz-jason Apr 9, 2019

Member

no need to trace

This comment has been minimized.

Copy link
@zimulala

zimulala Apr 10, 2019

Author Member

It's original code, and other cases in this file all use the trace. I think removing trace can be in other PR.

}

return nil
return errors.Trace(err)

This comment has been minimized.

Copy link
@zz-jason

zz-jason Apr 9, 2019

Member

ditto

@zimulala zimulala added status/LGT2 and removed status/LGT1 labels Apr 10, 2019

@xiekeyi98
Copy link
Contributor

xiekeyi98 left a comment

LGTM

@zhouqiang-cl

This comment has been minimized.

Copy link
Member

zhouqiang-cl commented Apr 10, 2019

/rebuild

zz-jason added some commits Apr 10, 2019

@zz-jason zz-jason merged commit e90f3b9 into pingcap:master Apr 11, 2019

6 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/code_coverage Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@zimulala zimulala deleted the zimulala:meta-ut branch Apr 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.