diff --git a/source/extensions/load_balancing_policies/client_side_weighted_round_robin/client_side_weighted_round_robin_lb.h b/source/extensions/load_balancing_policies/client_side_weighted_round_robin/client_side_weighted_round_robin_lb.h index afae3da36101..b9652c0771bd 100644 --- a/source/extensions/load_balancing_policies/client_side_weighted_round_robin/client_side_weighted_round_robin_lb.h +++ b/source/extensions/load_balancing_policies/client_side_weighted_round_robin/client_side_weighted_round_robin_lb.h @@ -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, diff --git a/test/common/router/router_test.cc b/test/common/router/router_test.cc index 081c56f899c3..9f440d7062ae 100644 --- a/test/common/router/router_test.cc +++ b/test/common/router/router_test.cc @@ -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.