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

xds: Cleanup CDS balancer code and tests. #3916

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

easwars
Copy link
Contributor

@easwars easwars commented Sep 30, 2020

  • Code cleanup:

    • Move comments from function top to near the actual code
    • Setup a no-opcancelWatch so that we don't need nil checks before invoking it
  • Tests cleanup:

    • Pass ctx with deadline to functions which wait for certain events. This way callers control the deadline.
    • Add more comments in every test to make them more readable on their own.
    • Add more tests for Close
    • Use a shorter deadline for events which are expected to not happen
  • With this change:

    • Test times reduce by 10x
    • Code coverage increases by 5%

@easwars
Copy link
Contributor Author

easwars commented Sep 30, 2020

I started working on the CDS balancer changes to support balancer.ClientConn interface, but found that the tests weren't very readable. So, I thought I will first fix this and then make my changes.

@easwars
Copy link
Contributor Author

easwars commented Oct 6, 2020

Ping ...

@easwars easwars merged commit c073660 into grpc:master Oct 6, 2020
@easwars easwars deleted the cds_lb_intercept branch October 6, 2020 23:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants