feat: Add CallOptions#merge and CallOptions equality checking #802
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds:
Gapic::CallOptions
andGapic::CallOptions::RetryPolicy
merge
method forGapic::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.