[testing] Update orca-* tests for better compatibility#32630
Merged
eugeneo merged 2 commits intogrpc:masterfrom Mar 16, 2023
Merged
[testing] Update orca-* tests for better compatibility#32630eugeneo merged 2 commits intogrpc:masterfrom
eugeneo merged 2 commits intogrpc:masterfrom
Conversation
1. Make channel creation lazy 2. Instantiate custom LB policy in Orca tests.
c1855d4 to
8c58296
Compare
Contributor
Author
|
@markdroth I reverted most changes so the tracker is now passed through the channel arguments. Please take another look. |
markdroth
approved these changes
Mar 16, 2023
Member
markdroth
left a comment
There was a problem hiding this comment.
Just a couple of minor comments, otherwise looks great!
test/cpp/interop/interop_client.cc
Outdated
| if (!new_stub_every_call_) { | ||
| stub_ = TestService::NewStub(channel_); | ||
| } | ||
| channel_ = absl::nullopt; |
Member
There was a problem hiding this comment.
Can just say:
channel_.reset();
stub_.reset();
test/cpp/interop/interop_client.h
Outdated
| private: | ||
| ChannelCreationFunc channel_creation_func_; | ||
| std::unique_ptr<TestService::Stub> stub_; | ||
| absl::optional<std::unique_ptr<TestService::Stub>> stub_; |
Member
There was a problem hiding this comment.
There's no need for absl::optional<> for the stub or the channel, since we don't need to differentiate between nullptr and nullopt.
eugeneo
commented
Mar 16, 2023
Contributor
Author
eugeneo
left a comment
There was a problem hiding this comment.
I addressed the comments. Thank you for the review.
test/cpp/interop/interop_client.h
Outdated
| private: | ||
| ChannelCreationFunc channel_creation_func_; | ||
| std::unique_ptr<TestService::Stub> stub_; | ||
| absl::optional<std::unique_ptr<TestService::Stub>> stub_; |
test/cpp/interop/interop_client.cc
Outdated
| if (!new_stub_every_call_) { | ||
| stub_ = TestService::NewStub(channel_); | ||
| } | ||
| channel_ = absl::nullopt; |
XuanWang-Amos
pushed a commit
to XuanWang-Amos/grpc
that referenced
this pull request
May 1, 2023
1. Make channel creation lazy. This allows test cases to update the configuration before the connection is made. 2. Pass load reports tracker when creating the policy. This way other test cases do not see any changes to ChannelArguments. Using grpc_core::CoreConfiguration::RunWithSpecialConfiguration was considered but did not work as it removes other builders setup prior to starting the test cases.
wanlin31
pushed a commit
that referenced
this pull request
May 18, 2023
1. Make channel creation lazy. This allows test cases to update the configuration before the connection is made. 2. Pass load reports tracker when creating the policy. This way other test cases do not see any changes to ChannelArguments. Using grpc_core::CoreConfiguration::RunWithSpecialConfiguration was considered but did not work as it removes other builders setup prior to starting the test cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Using grpc_core::CoreConfiguration::RunWithSpecialConfiguration was considered but did not work as it removes other builders setup prior to starting the test cases.