xds_lb_policy_registry_test.cc
Go to the documentation of this file.
1 //
2 //
3 // Copyright 2022 gRPC authors.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 //
18 
20 
21 #include <gmock/gmock.h>
22 #include <gtest/gtest.h>
23 
24 #include "absl/strings/str_format.h"
25 #include "upb/def.hpp"
26 #include "upb/upb.h"
27 #include "upb/upb.hpp"
28 
29 #include <grpc/grpc.h>
30 
33 #include "src/proto/grpc/testing/xds/v3/cluster.grpc.pb.h"
34 #include "src/proto/grpc/testing/xds/v3/ring_hash.grpc.pb.h"
35 #include "src/proto/grpc/testing/xds/v3/round_robin.grpc.pb.h"
36 #include "src/proto/grpc/testing/xds/v3/typed_struct.grpc.pb.h"
37 #include "src/proto/grpc/testing/xds/v3/udpa_typed_struct.grpc.pb.h"
38 #include "src/proto/grpc/testing/xds/v3/wrr_locality.grpc.pb.h"
41 
42 namespace grpc_core {
43 namespace testing {
44 namespace {
45 
46 using LoadBalancingPolicyProto =
47  ::envoy::config::cluster::v3::LoadBalancingPolicy;
48 using ::envoy::extensions::load_balancing_policies::ring_hash::v3::RingHash;
49 using ::envoy::extensions::load_balancing_policies::round_robin::v3::RoundRobin;
50 using ::envoy::extensions::load_balancing_policies::wrr_locality::v3::
51  WrrLocality;
52 using ::xds::type::v3::TypedStruct;
53 
54 // Uses XdsLbPolicyRegistry to convert
55 // envoy::config::cluster::v3::LoadBalancingPolicy to gRPC's JSON form.
56 absl::StatusOr<Json::Array> ConvertXdsPolicy(LoadBalancingPolicyProto policy) {
57  std::string serialized_policy = policy.SerializeAsString();
60  XdsEncodingContext context = {nullptr, XdsBootstrap::XdsServer(),
61  nullptr, symtab.ptr(),
62  arena.ptr(), true,
63  nullptr};
65  serialized_policy.data(), serialized_policy.size(), arena.ptr());
67 }
68 
69 TEST(XdsLbPolicyRegistryTest, EmptyLoadBalancingPolicy) {
70  auto result = ConvertXdsPolicy(LoadBalancingPolicyProto());
73  std::string(result.status().message()),
74  ::testing::HasSubstr("No supported load balancing policy config found"));
75 }
76 
77 TEST(XdsLbPolicyRegistryTest, UnsupportedBuiltinType) {
78  LoadBalancingPolicyProto policy;
79  auto* lb_policy = policy.add_policies();
80  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
81  LoadBalancingPolicyProto());
82  auto result = ConvertXdsPolicy(policy);
85  std::string(result.status().message()),
86  ::testing::HasSubstr("No supported load balancing policy config found"));
87 }
88 
89 TEST(XdsLbPolicyRegistryTest, MissingTypedExtensionConfig) {
90  LoadBalancingPolicyProto policy;
91  policy.add_policies();
92  auto result = ConvertXdsPolicy(policy);
94  EXPECT_THAT(std::string(result.status().message()),
95  ::testing::HasSubstr("Error parsing LoadBalancingPolicy::Policy "
96  "- Missing typed_extension_config field"));
97 }
98 
99 TEST(XdsLbPolicyRegistryTest, MissingTypedConfig) {
100  LoadBalancingPolicyProto policy;
101  auto* lb_policy = policy.add_policies();
102  lb_policy->mutable_typed_extension_config();
103  auto result = ConvertXdsPolicy(policy);
105  EXPECT_THAT(
106  std::string(result.status().message()),
107  ::testing::HasSubstr("Error parsing LoadBalancingPolicy::Policy - "
108  "Missing TypedExtensionConfig::typed_config field"));
109 }
110 
111 TEST(XdsLbPolicyRegistryTest, RingHashInvalidHash) {
112  RingHash ring_hash;
113  ring_hash.set_hash_function(RingHash::DEFAULT_HASH);
114  LoadBalancingPolicyProto policy;
115  auto* lb_policy = policy.add_policies();
116  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
117  ring_hash);
118  auto result = ConvertXdsPolicy(policy);
120  EXPECT_THAT(
121  std::string(result.status().message()),
122  ::testing::HasSubstr("Invalid hash function provided for RingHash "
123  "loadbalancing policy. Only XX_HASH is supported"));
124 }
125 
126 TEST(XdsLbPolicyRegistryTest, RingHashRingSizeDefaults) {
127  RingHash ring_hash;
128  ring_hash.set_hash_function(RingHash::XX_HASH);
129  LoadBalancingPolicyProto policy;
130  auto* lb_policy = policy.add_policies();
131  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
132  ring_hash);
133  auto result = ConvertXdsPolicy(policy);
134  EXPECT_TRUE(result.ok());
135  EXPECT_EQ(result->size(), 1);
137  EXPECT_EQ((*result)[0], Json::Parse("{"
138  "\"ring_hash_experimental\": {"
139  "}}",
140  &error));
141 }
142 
143 TEST(XdsLbPolicyRegistryTest, RingHashRingSizeCustom) {
144  RingHash ring_hash;
145  ring_hash.set_hash_function(RingHash::XX_HASH);
146  ring_hash.mutable_minimum_ring_size()->set_value(1234);
147  ring_hash.mutable_maximum_ring_size()->set_value(4567);
148  LoadBalancingPolicyProto policy;
149  auto* lb_policy = policy.add_policies();
150  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
151  ring_hash);
152  auto result = ConvertXdsPolicy(policy);
153  EXPECT_TRUE(result.ok());
154  EXPECT_EQ(result->size(), 1);
156  EXPECT_EQ((*result)[0], Json::Parse("{"
157  "\"ring_hash_experimental\": {"
158  " \"minRingSize\": 1234,"
159  " \"maxRingSize\": 4567"
160  "}}",
161  &error));
162 }
163 
164 TEST(XdsLbPolicyRegistryTest, RoundRobin) {
165  LoadBalancingPolicyProto policy;
166  auto* lb_policy = policy.add_policies();
167  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
168  RoundRobin());
169  auto result = ConvertXdsPolicy(policy);
170  EXPECT_TRUE(result.ok());
171  EXPECT_EQ(result->size(), 1);
173  EXPECT_EQ((*result)[0], Json::Parse("{"
174  "\"round_robin\": {}"
175  "}",
176  &error));
177 }
178 
179 TEST(XdsLbPolicyRegistryTest, WrrLocality) {
180  WrrLocality wrr_locality;
181  wrr_locality.mutable_endpoint_picking_policy()
182  ->add_policies()
183  ->mutable_typed_extension_config()
184  ->mutable_typed_config()
185  ->PackFrom(RoundRobin());
186  LoadBalancingPolicyProto policy;
187  auto* lb_policy = policy.add_policies();
188  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
189  wrr_locality);
190  auto result = ConvertXdsPolicy(policy);
191  EXPECT_TRUE(result.ok());
192  EXPECT_EQ(result->size(), 1);
194  EXPECT_EQ((*result)[0], Json::Parse("{"
195  "\"xds_wrr_locality_experimental\": {"
196  " \"child_policy\": [{"
197  " \"round_robin\": {}"
198  " }]"
199  "}}",
200  &error));
201 }
202 
203 TEST(XdsLbPolicyRegistryTest, WrrLocalityMissingEndpointPickingPolicy) {
204  LoadBalancingPolicyProto policy;
205  auto* lb_policy = policy.add_policies();
206  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
207  WrrLocality());
208  auto result = ConvertXdsPolicy(policy);
210  EXPECT_THAT(std::string(result.status().message()),
212  "Error parsing LoadBalancingPolicy.*WrrLocality: "
213  "endpoint_picking_policy not found"));
214 }
215 
216 TEST(XdsLbPolicyRegistryTest, WrrLocalityChildPolicyError) {
217  WrrLocality wrr_locality;
218  wrr_locality.mutable_endpoint_picking_policy()
219  ->add_policies()
220  ->mutable_typed_extension_config()
221  ->mutable_typed_config()
222  ->PackFrom(RingHash());
223  LoadBalancingPolicyProto policy;
224  auto* lb_policy = policy.add_policies();
225  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
226  wrr_locality);
227  auto result = ConvertXdsPolicy(policy);
229  EXPECT_THAT(std::string(result.status().message()),
231  "Error parsing LoadBalancingPolicy.*Error parsing "
232  "WrrLocality load balancing policy.*Error parsing "
233  "LoadBalancingPolicy.*Invalid hash function provided for "
234  "RingHash loadbalancing policy. Only XX_HASH is supported."));
235 }
236 
237 TEST(XdsLbPolicyRegistryTest, WrrLocalityUnsupportedTypeSkipped) {
238  // Create WrrLocality policy and add two policies to its list, an unsupported
239  // type and then a known RoundRobin type. Expect that the unsupported type is
240  // skipped and RoundRobin is selected.
241  WrrLocality wrr_locality;
242  wrr_locality.mutable_endpoint_picking_policy()
243  ->add_policies()
244  ->mutable_typed_extension_config()
245  ->mutable_typed_config()
246  ->PackFrom(LoadBalancingPolicyProto());
247  wrr_locality.mutable_endpoint_picking_policy()
248  ->add_policies()
249  ->mutable_typed_extension_config()
250  ->mutable_typed_config()
251  ->PackFrom(RoundRobin());
252  LoadBalancingPolicyProto policy;
253  auto* lb_policy = policy.add_policies();
254  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
255  wrr_locality);
256  auto result = ConvertXdsPolicy(policy);
257  EXPECT_TRUE(result.ok());
258  EXPECT_EQ(result->size(), 1);
260  EXPECT_EQ((*result)[0], Json::Parse("{"
261  "\"xds_wrr_locality_experimental\": {"
262  " \"child_policy\": [{"
263  " \"round_robin\": {}"
264  " }]"
265  "}}",
266  &error));
267 }
268 
269 class CustomLbPolicyFactory : public LoadBalancingPolicyFactory {
270  public:
271  OrphanablePtr<LoadBalancingPolicy> CreateLoadBalancingPolicy(
272  LoadBalancingPolicy::Args /* args */) const override {
273  GPR_ASSERT(false);
274  return nullptr;
275  }
276 
277  const char* name() const override { return "test.CustomLb"; }
278 
279  RefCountedPtr<LoadBalancingPolicy::Config> ParseLoadBalancingConfig(
280  const Json& /* json */, grpc_error_handle* /* error */) const override {
281  return nullptr;
282  }
283 };
284 
285 TEST(XdsLbPolicyRegistryTest, CustomLbPolicy) {
286  TypedStruct typed_struct;
287  typed_struct.set_type_url("type.googleapis.com/test.CustomLb");
288  LoadBalancingPolicyProto policy;
289  auto* lb_policy = policy.add_policies();
290  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
291  typed_struct);
292  auto result = ConvertXdsPolicy(policy);
293  EXPECT_TRUE(result.ok());
294  EXPECT_EQ(result->size(), 1);
296  EXPECT_EQ((*result)[0], Json::Parse("{"
297  "\"test.CustomLb\": null}",
298  &error));
299 }
300 
301 TEST(XdsLbPolicyRegistryTest, CustomLbPolicyUdpaTyped) {
302  ::udpa::type::v1::TypedStruct typed_struct;
303  typed_struct.set_type_url("type.googleapis.com/test.CustomLb");
304  LoadBalancingPolicyProto policy;
305  auto* lb_policy = policy.add_policies();
306  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
307  typed_struct);
308  auto result = ConvertXdsPolicy(policy);
309  EXPECT_TRUE(result.ok());
310  EXPECT_EQ(result->size(), 1);
312  EXPECT_EQ((*result)[0], Json::Parse("{"
313  "\"test.CustomLb\": null}",
314  &error));
315 }
316 
317 TEST(XdsLbPolicyRegistryTest, UnsupportedCustomTypeError) {
318  TypedStruct typed_struct;
319  typed_struct.set_type_url("myorg/foo/bar/test.UnknownLb");
320  LoadBalancingPolicyProto policy;
321  auto* lb_policy = policy.add_policies();
322  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
323  typed_struct);
324  auto result = ConvertXdsPolicy(policy);
326  EXPECT_THAT(
327  std::string(result.status().message()),
328  ::testing::HasSubstr("No supported load balancing policy config found"));
329 }
330 
331 TEST(XdsLbPolicyRegistryTest, CustomTypeInvalidUrlMissingSlash) {
332  TypedStruct typed_struct;
333  typed_struct.set_type_url("test.UnknownLb");
334  LoadBalancingPolicyProto policy;
335  auto* lb_policy = policy.add_policies();
336  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
337  typed_struct);
338  auto result = ConvertXdsPolicy(policy);
340  EXPECT_THAT(
341  std::string(result.status().message()),
342  ::testing::HasSubstr("Error parsing "
343  "LoadBalancingPolicy::Policy::TypedExtensionConfig::"
344  "typed_config: Invalid type_url test.UnknownLb"));
345 }
346 
347 TEST(XdsLbPolicyRegistryTest, CustomTypeInvalidUrlEmptyType) {
348  TypedStruct typed_struct;
349  typed_struct.set_type_url("myorg/");
350  LoadBalancingPolicyProto policy;
351  auto* lb_policy = policy.add_policies();
352  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
353  typed_struct);
354  auto result = ConvertXdsPolicy(policy);
356  EXPECT_THAT(
357  std::string(result.status().message()),
358  ::testing::HasSubstr("Error parsing "
359  "LoadBalancingPolicy::Policy::TypedExtensionConfig::"
360  "typed_config: Invalid type_url myorg/"));
361 }
362 
363 TEST(XdsLbPolicyRegistryTest, CustomLbPolicyJsonConversion) {
364  TypedStruct typed_struct;
366  R"pb(
367  type_url: "type.googleapis.com/test.CustomLb"
368  value {
369  fields {
370  key: "key"
371  value { null_value: NULL_VALUE }
372  }
373  fields {
374  key: "number"
375  value { number_value: 123 }
376  }
377  fields {
378  key: "string"
379  value { string_value: "value" }
380  }
381  fields {
382  key: "struct"
383  value {
384  struct_value {
385  fields {
386  key: "key"
387  value { null_value: NULL_VALUE }
388  }
389  }
390  }
391  }
392  fields {
393  key: "list"
394  value {
395  list_value {
396  values { null_value: NULL_VALUE }
397  values { number_value: 234 }
398  }
399  }
400  }
401  }
402  )pb",
403  &typed_struct));
404  LoadBalancingPolicyProto policy;
405  auto* lb_policy = policy.add_policies();
406  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
407  typed_struct);
408  auto result = ConvertXdsPolicy(policy);
409  EXPECT_TRUE(result.ok());
410  EXPECT_EQ(result->size(), 1);
413  R"json({
414  "test.CustomLb":{
415  "key": null,
416  "number": 123,
417  "string": "value",
418  "struct": {
419  "key": null
420  },
421  "list": [null, 234]
422  }
423  })json",
424  &error));
425 }
426 
427 TEST(XdsLbPolicyRegistryTest, CustomLbPolicyListError) {
428  TypedStruct typed_struct;
429  typed_struct.set_type_url("type.googleapis.com/test.CustomLb");
430  auto* fields = typed_struct.mutable_value()->mutable_fields();
432  value.mutable_list_value()->add_values();
433  (*fields)["key"] = value;
434  LoadBalancingPolicyProto policy;
435  auto* lb_policy = policy.add_policies();
436  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
437  typed_struct);
438  auto result = ConvertXdsPolicy(policy);
440  EXPECT_THAT(std::string(result.status().message()),
442  "Error parsing LoadBalancingPolicy: Custom Policy: "
443  "test.CustomLb: Error parsing google::Protobuf::Struct: No "
444  "value set in Value proto"));
445 }
446 
447 TEST(XdsLbPolicyRegistryTest, UnsupportedBuiltInTypeSkipped) {
448  // Add two policies to list, an unsupported type and then a known RoundRobin
449  // type. Expect that the unsupported type is skipped and RoundRobin is
450  // selected.
451  LoadBalancingPolicyProto policy;
452  auto* lb_policy = policy.add_policies();
453  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
454  LoadBalancingPolicyProto());
455  lb_policy = policy.add_policies();
456  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
457  RoundRobin());
458  auto result = ConvertXdsPolicy(policy);
459  EXPECT_TRUE(result.ok());
460  EXPECT_EQ(result->size(), 1);
462  EXPECT_EQ((*result)[0], Json::Parse("{"
463  "\"round_robin\": {}"
464  "}",
465  &error));
466 }
467 
468 TEST(XdsLbPolicyRegistryTest, UnsupportedCustomTypeSkipped) {
469  // Add two policies to list, an unsupported custom type and then a known
470  // RoundRobin type. Expect that the unsupported type is skipped and RoundRobin
471  // is selected.
472  TypedStruct typed_struct;
473  typed_struct.set_type_url("myorg/foo/bar/test.UnknownLb");
474  LoadBalancingPolicyProto policy;
475  auto* lb_policy = policy.add_policies();
476  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
477  typed_struct);
478  lb_policy = policy.add_policies();
479  lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom(
480  RoundRobin());
481  auto result = ConvertXdsPolicy(policy);
482  EXPECT_TRUE(result.ok());
483  EXPECT_EQ(result->size(), 1);
485  EXPECT_EQ((*result)[0], Json::Parse("{"
486  "\"round_robin\": {}"
487  "}",
488  &error));
489 }
490 
491 // Build a recurse load balancing policy that goes beyond the max allowable
492 // depth of 16.
493 LoadBalancingPolicyProto BuildRecursiveLoadBalancingPolicy(int depth) {
494  LoadBalancingPolicyProto policy;
495  if (depth >= 16) {
496  policy.add_policies()
497  ->mutable_typed_extension_config()
498  ->mutable_typed_config()
499  ->PackFrom(RoundRobin());
500  return policy;
501  }
502  WrrLocality wrr_locality;
503  *wrr_locality.mutable_endpoint_picking_policy() =
504  BuildRecursiveLoadBalancingPolicy(depth + 1);
505  policy.add_policies()
506  ->mutable_typed_extension_config()
507  ->mutable_typed_config()
508  ->PackFrom(wrr_locality);
509  return policy;
510 }
511 
512 TEST(XdsLbPolicyRegistryTest, MaxRecursion) {
513  auto result = ConvertXdsPolicy(BuildRecursiveLoadBalancingPolicy(0));
515  EXPECT_THAT(std::string(result.status().message()),
516  ::testing::ContainsRegex("LoadBalancingPolicy configuration has "
517  "a recursion depth of more than 16"));
518 }
519 
520 } // namespace
521 } // namespace testing
522 } // namespace grpc_core
523 
524 int main(int argc, char** argv) {
525  ::testing::InitGoogleTest(&argc, argv);
526  grpc::testing::TestEnvironment env(&argc, argv);
529  absl::make_unique<grpc_core::testing::CustomLbPolicyFactory>());
530  grpc_init();
531  auto result = RUN_ALL_TESTS();
532  grpc_shutdown();
533  return result;
534 }
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
testing
Definition: aws_request_signer_test.cc:25
testing::ContainsRegex
PolymorphicMatcher< internal::MatchesRegexMatcher > ContainsRegex(const internal::RE *regex)
Definition: cares/cares/test/gmock-1.8.0/gmock/gmock.h:8835
grpc_core::LoadBalancingPolicyRegistry::Builder::RegisterLoadBalancingPolicyFactory
static void RegisterLoadBalancingPolicyFactory(std::unique_ptr< LoadBalancingPolicyFactory > factory)
Definition: lb_policy_registry.cc:87
GRPC_ERROR_NONE
#define GRPC_ERROR_NONE
Definition: error.h:234
upb::SymbolTable
Definition: def.hpp:377
generate.env
env
Definition: generate.py:37
EXPECT_THAT
#define EXPECT_THAT(value, matcher)
grpc_core
Definition: call_metric_recorder.h:31
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
error
grpc_error_handle error
Definition: retry_filter.cc:499
lb_policy_factory.h
setup.name
name
Definition: setup.py:542
def.hpp
xds_lb_policy_registry.h
arena
grpc_core::ScopedArenaPtr arena
Definition: binder_transport_test.cc:237
EXPECT_EQ
#define EXPECT_EQ(a, b)
Definition: iomgr/time_averaged_stats_test.cc:27
GPR_ASSERT
#define GPR_ASSERT(x)
Definition: include/grpc/impl/codegen/log.h:94
hpack_encoder_fixtures::Args
Args({0, 16384})
Json
JSON (JavaScript Object Notation).
Definition: third_party/bloaty/third_party/protobuf/conformance/third_party/jsoncpp/json.h:227
upb.h
grpc.h
RUN_ALL_TESTS
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest.h:2471
main
int main(int argc, char **argv)
Definition: xds_lb_policy_registry_test.cc:524
config_grpc_cli.h
absl::StatusCode::kInvalidArgument
@ kInvalidArgument
grpc_core::Json::Parse
static Json Parse(absl::string_view json_str, grpc_error_handle *error)
Definition: json_reader.cc:899
test_config.h
value
const char * value
Definition: hpack_parser_table.cc:165
symtab
upb_symtab * symtab
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:774
upb::Arena
Definition: upb.hpp:68
testing::InitGoogleTest
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Definition: bloaty/third_party/googletest/googletest/src/gtest.cc:6106
lb_policy_registry.h
upb.hpp
google::protobuf::python::cmessage::ParseFromString
static PyObject * ParseFromString(CMessage *self, PyObject *arg)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/message.cc:1975
profile_analyzer.fields
list fields
Definition: profile_analyzer.py:266
grpc::testing::TestEnvironment
Definition: test/core/util/test_config.h:54
ASSERT_TRUE
#define ASSERT_TRUE(condition)
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest.h:1973
envoy_config_cluster_v3_LoadBalancingPolicy_parse
UPB_INLINE envoy_config_cluster_v3_LoadBalancingPolicy * envoy_config_cluster_v3_LoadBalancingPolicy_parse(const char *buf, size_t size, upb_Arena *arena)
Definition: config/cluster/v3/cluster.upb.h:2679
grpc_core::testing::TEST
TEST(ServiceConfigParserTest, DoubleRegistration)
Definition: service_config_test.cc:448
EXPECT_TRUE
#define EXPECT_TRUE(condition)
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest.h:1967
context
grpc::ClientContext context
Definition: istio_echo_server_lib.cc:61
absl::StatusOr
Definition: abseil-cpp/absl/status/statusor.h:187
Value
struct Value Value
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:676
grpc_init
GRPCAPI void grpc_init(void)
Definition: init.cc:146
grpc_error
Definition: error_internal.h:42
mkowners.depth
depth
Definition: mkowners.py:114
grpc_core::XdsLbPolicyRegistry::ConvertXdsLbPolicyConfig
static absl::StatusOr< Json::Array > ConvertXdsLbPolicyConfig(const XdsEncodingContext &context, const envoy_config_cluster_v3_LoadBalancingPolicy *lb_policy, int recursion_depth=0)
Definition: xds_lb_policy_registry.cc:189
testing::HasSubstr
PolymorphicMatcher< internal::HasSubstrMatcher< internal::string > > HasSubstr(const internal::string &substring)
Definition: cares/cares/test/gmock-1.8.0/gmock/gmock.h:8803
grpc_shutdown
GRPCAPI void grpc_shutdown(void)
Definition: init.cc:209


grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:59