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

client, tests: testify the client tests #5081

Merged
merged 7 commits into from
Jun 1, 2022

Conversation

JmPotato
Copy link
Member

Signed-off-by: JmPotato [email protected]

What problem does this PR solve?

Issue Number: ref #4813.

What is changed and how does it work?

Testify the client tests.

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

@JmPotato JmPotato added component/testing CI testing. component/client Client logic. labels May 31, 2022
@ti-chi-bot
Copy link
Member

ti-chi-bot commented May 31, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bufferflies
  • lhy1024

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 the release-note-none Denotes a PR that doesn't merit a release note. label May 31, 2022
@JmPotato JmPotato mentioned this pull request May 31, 2022
85 tasks
@codecov
Copy link

codecov bot commented May 31, 2022

Codecov Report

Merging #5081 (aeed164) into master (1fa1d4f) will decrease coverage by 0.05%.
The diff coverage is 92.00%.

@@            Coverage Diff             @@
##           master    #5081      +/-   ##
==========================================
- Coverage   75.54%   75.49%   -0.06%     
==========================================
  Files         308      308              
  Lines       30378    30401      +23     
==========================================
+ Hits        22950    22951       +1     
- Misses       5434     5459      +25     
+ Partials     1994     1991       -3     
Flag Coverage Δ
unittests 75.49% <92.00%> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
client/testutil/testutil.go 54.54% <50.00%> (ø)
pkg/testutil/testutil.go 93.10% <91.66%> (-1.02%) ⬇️
tests/cluster.go 77.52% <100.00%> (-2.89%) ⬇️
server/tso/local_allocator.go 64.86% <0.00%> (-10.82%) ⬇️
pkg/dashboard/adapter/manager.go 74.71% <0.00%> (-6.90%) ⬇️
server/storage/kv/etcd_kv.go 79.71% <0.00%> (-5.80%) ⬇️
server/election/leadership.go 75.25% <0.00%> (-5.16%) ⬇️
server/region_syncer/server.go 82.06% <0.00%> (-4.35%) ⬇️
server/member/member.go 64.21% <0.00%> (-1.58%) ⬇️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1fa1d4f...aeed164. Read the comment docs.

tests/client/client_test.go Outdated Show resolved Hide resolved
@JmPotato JmPotato force-pushed the testify_client branch 3 times, most recently from 54d4199 to 0892c39 Compare June 1, 2022 03:15
@JmPotato JmPotato requested a review from rleungx June 1, 2022 03:18
tests/client/client_test.go Outdated Show resolved Hide resolved
}
return checker
}

func (s *testClientSuite) SetUpSuite(c *C) {
func newTestClient(re *require.Assertions) *testClient {
Copy link
Member

Choose a reason for hiding this comment

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

We can also use suite here.

Copy link
Member Author

Choose a reason for hiding this comment

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

The tests inside a suite can not be run in parallel, see stretchr/testify#187.

Copy link
Member Author

Choose a reason for hiding this comment

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

After consideration, let's keep using suite here to finish the migration first.

@JmPotato JmPotato requested a review from rleungx June 1, 2022 04:55
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 1, 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 Jun 1, 2022
@JmPotato
Copy link
Member Author

JmPotato commented Jun 1, 2022

/merge

@ti-chi-bot
Copy link
Member

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

/run-all-tests

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: 6f589e9

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 1, 2022
tests/client/client_test.go Outdated Show resolved Hide resolved
@rleungx
Copy link
Member

rleungx commented Jun 1, 2022

/hold

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 1, 2022
tests/client/client_test.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Jun 1, 2022
@rleungx
Copy link
Member

rleungx commented Jun 1, 2022

/hold cancel

@ti-chi-bot ti-chi-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 1, 2022
@rleungx
Copy link
Member

rleungx commented Jun 1, 2022

/merge

@ti-chi-bot
Copy link
Member

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

/run-all-tests

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: aeed164

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 1, 2022
@ti-chi-bot ti-chi-bot merged commit ce6b35d into tikv:master Jun 1, 2022
@JmPotato JmPotato deleted the testify_client branch June 1, 2022 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/client Client logic. component/testing CI testing. release-note-none Denotes a PR that doesn't merit a release note. 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.

5 participants