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

feat: Add CallOptions#merge and CallOptions equality checking #802

Merged
merged 1 commit into from
Jul 27, 2022

Conversation

dazuma
Copy link
Member

@dazuma dazuma commented Jul 27, 2022

Adds:

  • Correct equality checking for Gapic::CallOptions and Gapic::CallOptions::RetryPolicy
  • Corresponding hashcode computation
  • merge method for Gapic::CallOptions

These are necessary for CallOptions to be used successfully in the mocks for the spanner client tests. We've had a bit of a challenge getting those tests working again with the changes to minitest 5.16, and my current solution is for the tests to use CallOptions objects rather than hashes to pass call options. This means CallOptions objects need proper equality checking so the mocks can recognize them. There are also a few tests that are calling Hash#merge on call options hashes, so this replicates that functionality on the CallOptions class.

@dazuma dazuma requested a review from a team as a code owner July 27, 2022 20:24
Copy link
Member

@viacheslav-rostovtsev viacheslav-rostovtsev left a comment

Choose a reason for hiding this comment

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

LGTM

@dazuma dazuma merged commit 4028cfe into googleapis:main Jul 27, 2022
@dazuma dazuma deleted the pr/call-options-objects branch August 3, 2022 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants