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

pickfirst: cleanup tests #5263

Merged
merged 2 commits into from Mar 22, 2022
Merged

pickfirst: cleanup tests #5263

merged 2 commits into from Mar 22, 2022

Conversation

easwars
Copy link
Contributor

@easwars easwars commented Mar 21, 2022

This is in preparation for the changes to be made for #5260.

Summary of changes:

  • Moves the tests out pickfirst_test.go and puts them in test/pickfirst_test.go. This ensures that we use the public API.
  • Makes helper functions for setup and checking if pick_first is working as expected.
    • This significantly reduces boiler plate in individual tests.
  • Comments to help with reading of the tests.

Note:

RELEASE NOTES: none

@easwars easwars closed this Mar 22, 2022
@easwars easwars reopened this Mar 22, 2022
@@ -79,6 +80,13 @@ func startServers(t *testing.T, numServers int, maxStreams uint32) ([]*server, f
}
}

func errorDesc(err error) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this called?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently called from balancer_switching_test.go, server_test.go and pickfirst_test.go. All references to this from the last file are removed in this PR.

@menghanl menghanl assigned easwars and unassigned menghanl Mar 22, 2022
@easwars easwars merged commit 96bdede into grpc:master Mar 22, 2022
@easwars easwars deleted the pickfirst_move_to_tf branch March 22, 2022 21:33
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants