Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: wangbaiping(wbpcode) <[email protected]>
  • Loading branch information
wbpcode committed Jan 4, 2025
1 parent 742ed26 commit 59ca17d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ class ClientSideWeightedRoundRobinLoadBalancer : public Upstream::ThreadAwareLoa

// This class is used to handle ORCA load reports.
// It stores the config necessary to calculate host weight based on the report.
// The load balancer context stores a weak pointer to this handler,
// so it is NOT invoked if the load balancer is deleted.
class OrcaLoadReportHandler {
public:
OrcaLoadReportHandler(const ClientSideWeightedRoundRobinLbConfig& lb_config,
Expand Down
3 changes: 2 additions & 1 deletion test/common/router/router_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6849,7 +6849,8 @@ TEST_F(RouterTest, OrcaLoadReportCallbackReturnsError) {
EXPECT_CALL(*host_lb_policy_data_raw_ptr, onOrcaLoadReport(_))
.WillOnce(Invoke([&](const xds::data::orca::v3::OrcaLoadReport& orca_load_report) {
received_orca_load_report = orca_load_report;
return absl::OkStatus();
// Return an error that gets logged by router filter.
return absl::InvalidArgumentError("Unexpected ORCA load Report");
}));

// Send metrics in the trailers.
Expand Down

0 comments on commit 59ca17d

Please sign in to comment.