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

[vtctld | tests only] testtmclient refactor #7518

Merged
merged 8 commits into from Feb 22, 2021

Conversation

ajm188
Copy link
Contributor

@ajm188 ajm188 commented Feb 18, 2021

Description

This PR unifies the various mock tmclient implementations I've added for testing different vtctld functions. It also moves us further from a singleton mocking pattern, which will let us parallelize our test suite even further.

Related Issue(s)

Checklist

  • Should this PR be backported? no
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build/CI
  • VTAdmin

Signed-off-by: Andrew Mason <amason@slack-corp.com>
This frees up that name for a type in the next commit

Signed-off-by: Andrew Mason <amason@slack-corp.com>
Only change was the type name, and the addition of documentation.

Signed-off-by: Andrew Mason <amason@slack-corp.com>
… tests

Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
// on each other during VtctldServer initialization, but still run the rest of
// the test in parallel.
//
// NOTE, THE FIRST: It is only safe to use in parallel with other tests using
Copy link
Contributor

Choose a reason for hiding this comment

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

Very poetic.

Signed-off-by: Andrew Mason <amason@slack-corp.com>
Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

LGTM

@deepthi deepthi merged commit 0a9e2dd into vitessio:master Feb 22, 2021
@askdba askdba added this to the v10.0 milestone Feb 22, 2021
@ajm188 ajm188 deleted the am_testtmclient_refactor branch March 4, 2021 16:32
ajm188 pushed a commit to tinyspeck/vitess that referenced this pull request Mar 5, 2021
[vtctld | tests only] testtmclient refactor
Conflicts:
	go/vt/vtadmin/api_test.go
	go/vt/vtctl/reparentutil/emergency_reparenter_test.go
	go/vt/vtctl/reparentutil/planned_reparenter_test.go

Resolved by `git rm -f` those files.

Note: Also includes a change to grpcvtctldclient/client_test.go, not in the
cherry-picked commit, to use the testutil constructor for vtctldservers.

Signed-off-by: Andrew Mason <amason@slack-corp.com>

wip test fixes

Signed-off-by: Andrew Mason <amason@slack-corp.com>
setassociative pushed a commit to tinyspeck/vitess that referenced this pull request Mar 11, 2021
[vtctld | tests only] testtmclient refactor
Conflicts:
	go/vt/vtadmin/api_test.go
	go/vt/vtctl/reparentutil/emergency_reparenter_test.go
	go/vt/vtctl/reparentutil/planned_reparenter_test.go

Resolved by `git rm -f` those files.

Note: Also includes a change to grpcvtctldclient/client_test.go, not in the
cherry-picked commit, to use the testutil constructor for vtctldservers.

Signed-off-by: Andrew Mason <amason@slack-corp.com>

wip test fixes

Signed-off-by: Andrew Mason <amason@slack-corp.com>

Signed-off-by: Richard Bailey <rbailey@slack-corp.com>
@rafael rafael restored the am_testtmclient_refactor branch April 5, 2021 18:29
@rafael rafael deleted the am_testtmclient_refactor branch April 5, 2021 18:33
rafael pushed a commit to tinyspeck/vitess that referenced this pull request Apr 6, 2021
[vtctld | tests only] testtmclient refactor

Note: Manually deleted api_test.go due to cherry-pick conflict

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
@ajm188 ajm188 added this to In progress in Vtctld Service via automation May 23, 2021
@ajm188 ajm188 moved this from In progress to Done in Vtctld Service May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants