1# xDS (Load-Balancing) Interop Test Case Descriptions 2 3Client and server use [test.proto](../src/proto/grpc/testing/test.proto). 4 5## Server 6 7The code for the xDS test server can be found at: 8[Java](https://github.com/grpc/grpc-java/blob/master/interop-testing/src/main/java/io/grpc/testing/integration/XdsTestServer.java) (other language implementations are in progress). 9 10Server should accept these arguments: 11 12* --port=PORT 13 * The port the test server will run on. 14* --maintenance_port=PORT 15 * The port for the maintenance server running health, channelz, and admin(CSDS) services. 16* --secure_mode=BOOLEAN 17 * When set to true it uses XdsServerCredentials with the test server for security test cases. 18 In case of secure mode, port and maintenance_port should be different. 19* --enable-csm-observability=BOOLEAN 20 * When set to true, enable CSM Observability. 21 22Servers that want to support dual stack testing (like Java) should also accept: 23 24* --address_type=IPV4|IPV6|IPV4_IPV6 25 * Type of IP address to bind to. IPV4_IPV6 will use the wildcard address. 26 IPV4 and IPV6 will cause server to bind to one non-localhost and the localhost address of the appropriate type 27 28In addition, when handling requests, if the initial request metadata contains the `rpc-behavior` key, it should modify its handling of the request as follows: 29 30 - If the value matches `sleep-<int>`, the server should wait the specified number of seconds before resuming behavior matching and RPC processing. 31 - If the value matches `keep-open`, the server should never respond to the request and behavior matching ends. 32 - If the value matches `error-code-<int>`, the server should respond with the specified status code and behavior matching ends. 33 - If the value matches `succeed-on-retry-attempt-<int>`, and the value of the `grpc-previous-rpc-attempts` metadata field is equal to the specified number, the normal RPC processing should resume and behavior matching ends. 34 - A value can have a prefix `hostname=<string>` followed by a space. In that case, the rest of the value should only be applied if the specified hostname matches the server's hostname. 35 36The `rpc-behavior` header value can have multiple options separated by commas. In that case, the value should be split by commas and the options should be applied in the order specified. If a request has multiple `rpc-behavior` metadata values, each one should be processed that way in order. 37 38## Client 39 40The base behavior of the xDS test client is to send a constant QPS of unary 41messages and record the remote-peer distribution of the responses. Further, the 42client must expose an implementation of the `LoadBalancerStatsService` gRPC 43service to allow the test driver to validate the load balancing behavior for a 44particular test case (see below for more details). 45 46The code for the xDS test client can be at: 47[Java](https://github.com/grpc/grpc-java/blob/master/interop-testing/src/main/java/io/grpc/testing/integration/XdsTestClient.java) (other language implementations are in progress). 48 49Clients should accept these arguments: 50 51* --fail_on_failed_rpcs=BOOL 52 * If true, the client should exit with a non-zero return code if any RPCs 53 fail after at least one RPC has succeeded, indicating a valid xDS config 54 was received. This accounts for any startup-related delays in receiving 55 an initial config from the load balancer. Default is false. 56* --num_channels=CHANNELS 57 * The number of channels to create to the server. 58* --qps=QPS 59 * The QPS per channel. 60* --server=HOSTNAME:PORT 61 * The server host to connect to. For example, "localhost:8080" 62* --stats_port=PORT 63 * The port for to expose the client's `LoadBalancerStatsService` 64 implementation. 65* --rpc_timeout_sec=SEC 66 * The timeout to set on all outbound RPCs. Default is 20. 67* --secure_mode=BOOLEAN 68 * When set to true it uses XdsChannelCredentials with the test client for security test cases. 69* --enable-csm-observability=BOOLEAN 70 * When set to true, enable CSM Observability. 71* --request_payload_size=INT32 72 * Set the SimpleRequest.payload.body to a string of repeated '0' characters of the given size in bytes. 73* --response_payload_size=INT32 74 * Ask the server to respond with SimpleResponse.payload.body of the given length. 75 76### XdsUpdateClientConfigureService 77 78The xDS test client's behavior can be dynamically changed in the middle of tests. 79This is achieved by invoking the `XdsUpdateClientConfigureService` gRPC service 80on the test client. This can be useful for tests requiring special client behaviors 81that are not desirable at test initialization and client warmup. The service is 82defined as: 83 84``` 85message ClientConfigureRequest { 86 // Type of RPCs to send. 87 enum RpcType { 88 EMPTY_CALL = 0; 89 UNARY_CALL = 1; 90 } 91 92 // Metadata to be attached for the given type of RPCs. 93 message Metadata { 94 RpcType type = 1; 95 string key = 2; 96 string value = 3; 97 } 98 99 // The types of RPCs the client sends. 100 repeated RpcType types = 1; 101 // The collection of custom metadata to be attached to RPCs sent by the client. 102 repeated Metadata metadata = 2; 103 // The deadline to use, in seconds, for all RPCs. If unset or zero, the 104 // client will use the default from the command-line. 105 int32 timeout_sec = 3; 106} 107 108message ClientConfigureResponse {} 109 110service XdsUpdateClientConfigureService { 111 // Update the tes client's configuration. 112 rpc Configure(ClientConfigureRequest) returns (ClientConfigureResponse); 113} 114``` 115 116The test client changes its behavior right after receiving the 117`ClientConfigureRequest`. Currently it only supports configuring the type(s) 118of RPCs sent by the test client, metadata attached to each type of RPCs, and the timeout. 119 120## Test Driver 121 122Note that, unlike our other interop tests, neither the client nor the server has 123any notion of which of the following test scenarios is under test. Instead, a 124separate test driver is responsible for configuring the load balancer and the 125server backends, running the client, and then querying the client's 126`LoadBalancerStatsService` to validate load balancer behavior for each of the 127tests described below. 128 129## LoadBalancerStatsService 130 131The service is defined as: 132 133``` 134message LoadBalancerStatsRequest { 135 // Request stats for the next num_rpcs sent by client. 136 int32 num_rpcs = 1; 137 // If num_rpcs have not completed within timeout_sec, return partial results. 138 int32 timeout_sec = 2; 139} 140 141message LoadBalancerStatsResponse { 142 message RpcsByPeer { 143 // The number of completed RPCs for each peer. 144 map<string, int32> rpcs_by_peer = 1; 145 } 146 // The number of completed RPCs for each peer. 147 map<string, int32> rpcs_by_peer = 1; 148 // The number of RPCs that failed to record a remote peer. 149 int32 num_failures = 2; 150 map<string, RpcsByPeer> rpcs_by_method = 3; 151} 152 153message LoadBalancerAccumulatedStatsRequest {} 154 155message LoadBalancerAccumulatedStatsResponse { 156 // The total number of RPCs have ever issued for each type. 157 // Deprecated: use stats_per_method.rpcs_started instead. 158 map<string, int32> num_rpcs_started_by_method = 1 [deprecated = true]; 159 // The total number of RPCs have ever completed successfully for each type. 160 // Deprecated: use stats_per_method.result instead. 161 map<string, int32> num_rpcs_succeeded_by_method = 2 [deprecated = true]; 162 // The total number of RPCs have ever failed for each type. 163 // Deprecated: use stats_per_method.result instead. 164 map<string, int32> num_rpcs_failed_by_method = 3 [deprecated = true]; 165 166 message MethodStats { 167 // The number of RPCs that were started for this method. 168 int32 rpcs_started = 1; 169 170 // The number of RPCs that completed with each status for this method. The 171 // key is the integral value of a google.rpc.Code; the value is the count. 172 map<int32, int32> result = 2; 173 } 174 175 // Per-method RPC statistics. The key is the RpcType in string form; e.g. 176 // 'EMPTY_CALL' or 'UNARY_CALL' 177 map<string, MethodStats> stats_per_method = 4; 178} 179 180service LoadBalancerStatsService { 181 // Gets the backend distribution for RPCs sent by a test client. 182 rpc GetClientStats(LoadBalancerStatsRequest) 183 returns (LoadBalancerStatsResponse) {} 184 // Gets the accumulated stats for RPCs sent by a test client. 185 rpc GetClientAccumulatedStats(LoadBalancerAccumulatedStatsRequest) 186 returns (LoadBalancerAccumulatedStatsResponse) {} 187} 188``` 189 190Note that the `LoadBalancerStatsResponse` contains the remote peer distribution 191of the next `num_rpcs` *sent* by the client after receiving the 192`LoadBalancerStatsRequest`. It is important that the remote peer distribution be 193recorded for a block of consecutive outgoing RPCs, to validate the intended 194distribution from the load balancer, rather than just looking at the next 195`num_rpcs` responses received from backends, as different backends may respond 196at different rates. 197 198## Test Cases 199 200### ping_pong 201 202This test verifies that every backend receives traffic. 203 204Client parameters: 205 2061. --num_channels=1 2071. --qps=100 2081. --fail_on_failed_rpc=true 209 210Load balancer configuration: 211 2121. 4 backends are created in a single managed instance group (MIG). 213 214Test driver asserts: 215 2161. All backends receive at least one RPC 217 218### round_robin 219 220This test verifies that RPCs are evenly routed according to an unweighted round 221robin policy. 222 223Client parameters: 224 2251. --num_channels=1 2261. --qps=100 2271. --fail_on_failed_rpc=true 228 229Load balancer configuration: 230 2311. 4 backends are created in a single MIG. 232 233Test driver asserts that: 234 2351. Once all backends receive at least one RPC, the following 100 RPCs are 236 evenly distributed across the 4 backends. 237 238### backends_restart 239 240This test verifies that the load balancer will resume sending traffic to a set 241of backends that is stopped and then resumed. 242 243Client parameters: 244 2451. --num_channels=1 2461. --qps=100 247 248Load balancer configuration: 249 2501. 4 backends are created in a single MIG. 251 252Test driver asserts: 253 2541. All backends receive at least one RPC. 255 256The test driver records the peer distribution for a subsequent block of 100 RPCs 257then stops the backends. 258 259Test driver asserts: 260 2611. No RPCs from the client are successful. 262 263The test driver resumes the backends. 264 265Test driver asserts: 266 2671. Once all backends receive at least one RPC, the distribution for a block of 268 100 RPCs is the same as the distribution recorded prior to restart. 269 270### secondary_locality_gets_requests_on_primary_failure 271 272This test verifies that backends in a secondary locality receive traffic when 273all backends in the primary locality fail. 274 275Client parameters: 276 2771. --num_channels=1 2781. --qps=100 279 280Load balancer configuration: 281 2821. The primary MIG with 2 backends in the same zone as the client 2831. The secondary MIG with 2 backends in a different zone 284 285Test driver asserts: 286 2871. All backends in the primary locality receive at least 1 RPC. 2881. No backends in the secondary locality receive RPCs. 289 290The test driver stops the backends in the primary locality. 291 292Test driver asserts: 293 2941. All backends in the secondary locality receive at least 1 RPC. 295 296The test driver resumes the backends in the primary locality. 297 298Test driver asserts: 299 3001. All backends in the primary locality receive at least 1 RPC. 3011. No backends in the secondary locality receive RPCs. 302 303### secondary_locality_gets_no_requests_on_partial_primary_failure 304 305This test verifies that backends in a failover locality do not receive traffic 306when at least one of the backends in the primary locality remain healthy. 307 308**Note:** Future TD features may change the expected behavior and require 309changes to this test case. 310 311Client parameters: 312 3131. --num_channels=1 3141. --qps=100 315 316Load balancer configuration: 317 3181. The primary MIG with 2 backends in the same zone as the client 3191. The secondary MIG with 2 backends in a different zone 320 321Test driver asserts: 322 3231. All backends in the primary locality receive at least 1 RPC. 3241. No backends in the secondary locality receive RPCs. 325 326The test driver stops one of the backends in the primary locality. 327 328Test driver asserts: 329 3301. All backends in the primary locality receive at least 1 RPC. 3311. No backends in the secondary locality receive RPCs. 332 333### remove_instance_group 334 335This test verifies that a remaining instance group can successfully serve RPCs 336after removal of another instance group in the same zone. 337 338Client parameters: 339 3401. --num_channels=1 3411. --qps=100 342 343Load balancer configuration: 344 3451. Two MIGs with two backends each, using rate balancing mode. 346 347Test driver asserts: 348 3491. All backends receive at least one RPC. 350 351The test driver removes one MIG. 352 353Test driver asserts: 354 3551. All RPCs are directed to the two remaining backends (no RPC failures). 356 357### change_backend_service 358 359This test verifies that the backend service can be replaced and traffic routed 360to the new backends. 361 362Client parameters: 363 3641. --num_channels=1 3651. --qps=100 3661. --fail_on_failed_rpc=true 367 368Load balancer configuration: 369 3701. One MIG with two backends 371 372Test driver asserts: 373 3741. All backends receive at least one RPC. 375 376The test driver creates a new backend service containing a MIG with two backends 377and changes the TD URL map to point to this new backend service. 378 379Test driver asserts: 380 3811. All RPCs are directed to the new backend service. 382 383### traffic_splitting 384 385This test verifies that the traffic will be distributed between backend 386services with the correct weights when route action is set to weighted 387backend services. 388 389Client parameters: 390 3911. --num_channels=1 3921. --qps=100 393 394Load balancer configuration: 395 3961. One MIG with one backend 397 398Assert: 399 4001. Once all backends receive at least one RPC, the following 1000 RPCs are 401all sent to MIG_a. 402 403The test driver adds a new MIG with 1 backend, and changes the route action 404to weighted backend services with {a: 20, b: 80}. 405 406Assert: 407 4081. Once all backends receive at least one RPC, the following 1000 RPCs are 409distributed across the 2 backends as a: 20, b: 80. 410### path_matching 411 412This test verifies that the traffic for a certain RPC can be routed to a 413specific cluster based on the RPC path. 414 415Client parameters: 416 4171. –num_channels=1 4181. –qps=10 4191. –fail_on_failed_rpc=true 4201. –rpc=“EmptyCall,UnaryCall” 421 422Load balancer configuration: 423 4241. 2 MIGs, each with 1 backend 4251. routes 426 - “/”: MIG_default 427 428Assert: 429 4301. UnaryCall RPCs are sent to MIG_default 4311. EmptyCall RPCs are sent to MIG_default 432 433The test driver changes route and asserts RPCs are sent to expected backends. **Note** that the default route `"/"` is always pointing to MIG_default, so all RPCs not matching the new route will be sent to MIG_default. 434 435- {path: `/grpc.testing.TestService/EmptyCall`}: MIG_2 436 - UnaryCall -> MIG_default 437 - EmptyCall -> MIG_2 438 439- {prefix: `/grpc.testing.TestService/Unary`}: MIG_2 440 - UnaryCall -> MIG_2 441 - EmptyCall -> MIG_default 442 443- {prefix: `/grpc.testing.TestService/Unary`}: MIG_default & {path: `/grpc.testing.TestService/EmptyCall`}: MIG_2 444 - UnaryCall -> MIG_default 445 - EmptyCall -> MIG_2 446 447- {regex: `^\/.*\/UnaryCall$`}: MIG_2 448 - UnaryCall -> MIG_2 449 - EmptyCall -> MIG_default 450 451- {path: `/gRpC.tEsTinG.tEstseRvice/empTycaLl`, ignoreCase: `True`}: MIG_2 452 - UnaryCall -> MIG_default 453 - EmptyCall -> MIG_2 454 455### header_matching 456 457This test verifies that the traffic for a certain RPC can be routed to a 458specific cluster based on the RPC header (metadata). 459 460Client parameters: 461 4621. –num_channels=1 4631. –qps=10 4641. –fail_on_failed_rpc=true 4651. –rpc=“EmptyCall,UnaryCall” 4661. –rpc=“EmptyCall:xds_md:exact_match” 467 468Load balancer configuration: 469 4701. 2 MIGs, each with 1 backend 4711. routes 472 - “/”: MIG_default 473 474Assert: 475 4761. UnaryCall RPCs are sent to MIG_default 4771. EmptyCall RPCs are sent to MIG_default 478 479The test driver changes route and asserts RPCs are sent to expected backends. **Note** that the default route `"/"` is always pointing to MIG_default, so all RPCs not matching the new route will be sent to MIG_default. 480 481- {header `xds_md`, exact: `empty_ytpme`}: MIG_2 482 - Unary -> MIG_default 483 - Empty -> MIG_2 484 485- {header `xds_md`, prefix: `un`}: MIG_2 486 - `un` is the prefix of metadata sent with UnaryCall 487 - Unary -> MIG_2 488 - Empty -> MIG_default 489 490- {header `xds_md`, suffix: `me`}: MIG_2 491 - `me` is the suffix of metadata sent with EmptyCall 492 - Unary -> MIG_default 493 - Empty to MIG_2 494 495- {header `xds_md_numeric`, present: `True`}: MIG_2 496 - Unary is sent with the metadata, so will be sent to alternative 497 - Unary -> MIG_2 498 - Empty -> MIG_default 499 500- {header `xds_md`, exact: `unary_yranu`, invert: `True`}: MIG_2 501 - Unary is sent with the metadata, so this will not match Unary, but will match Empty 502 - Unary -> MIG_default 503 - Empty to MIG_2 504 505- {header `xds_md_numeric`, range `[100,200]`}: MIG_2 506 - Unary is sent with the metadata in range 507 - Unary -> MIG_2 508 - Empty -> MIG_default 509 510- {header `xds_md`, regex: `^em.*me$`}: MIG_2 511 - EmptyCall is sent with the metadata 512 - Unary -> MIG_default 513 - Empty -> MIG_2 514 515### gentle_failover 516 517This test verifies that traffic is partially diverted to a secondary locality 518when > 50% of the instances in the primary locality are unhealthy. 519 520Client parameters: 521 5221. --num_channels=1 5231. --qps=100 524 525Load balancer configuration: 526 5271. The primary MIG with 3 backends in the same zone as the client 5281. The secondary MIG with 2 backends in a different zone 529 530Test driver asserts: 531 5321. All backends in the primary locality receive at least 1 RPC. 5331. No backends in the secondary locality receive RPCs. 534 535The test driver stops 2 of 3 backends in the primary locality. 536 537Test driver asserts: 538 5391. All backends in the secondary locality receive at least 1 RPC. 5401. The remaining backend in the primary locality receives at least 1 RPC. 541 542The test driver resumes the backends in the primary locality. 543 544Test driver asserts: 545 5461. All backends in the primary locality receive at least 1 RPC. 5471. No backends in the secondary locality receive RPCs. 548 549 550### load_based_failover 551 552This test verifies that traffic is partially diverted to a secondary locality 553when the QPS is greater than the configured RPS in the priority locality. 554 555Client parameters: 556 5571. --num_channels=1 5581. --qps=100 559 560Load balancer configuration: 561 5621. The primary MIG with 2 backends in the same zone as the client 5631. The secondary MIG with 2 backends in a different zone 564 565Test driver asserts: 566 5671. All backends in the primary locality receive at least 1 RPC. 5681. No backends in the secondary locality receive RPCs. 569 570The test driver sets `balancingMode` is `RATE`, and `maxRate` to 20 in the primary locality. 571 572Test driver asserts: 573 5741. All backends in the primary locality receive at least 1 RPC. 5751. All backends in the secondary locality receive at least 1 RPC. 576 577The test driver set `maxRate` to 120 in the primary locality. 578 579Test driver asserts: 580 5811. All backends in the primary locality receive at least 1 RPC. 5821. No backends in the secondary locality receive RPCs. 583 584 585### circuit_breaking 586 587This test verifies that the maximum number of outstanding requests is limited 588by circuit breakers of the backend service. 589 590Client parameters: 591 5921. --num_channels=1 5931. --qps=100 594 595Load balancer configuration: 596 5971. Two MIGs with each having two backends. 598 599The test driver configures the backend services with: 600 6011. path{“/grpc.testing.TestService/UnaryCall"}: MIG_1 6021. path{“/grpc.testing.TestService/EmptyCall"}: MIG_2 6031. MIG_1 circuit_breakers with max_requests = 500 6041. MIG_2 circuit breakers with max_requests = 1000 605 606The test driver configures the test client to send both UnaryCall and EmptyCall, 607with all RPCs keep-open. 608 609Assert: 610 6111. After reaching steady state, there are 500 UnaryCall RPCs in-flight 612and 1000 EmptyCall RPCs in-flight. 613 614The test driver updates MIG_1's circuit breakers with max_request = 800. 615 616Test driver asserts: 617 6181. After reaching steady state, there are 800 UnaryCall RPCs in-flight. 619 620### timeout 621 622This test verifies that traffic along a route with a `max_stream_duration` set 623will cause timeouts on streams open longer than that duration. 624 625Client parameters: 626 6271. `--num_channels=1` 6281. `--qps=100` 629 630Route Configuration: 631 632Two routes: 633 6341. Path match for `/grpc.testing.TestService/UnaryCall`, with a `route_action` 635 containing `max_stream_duration` of 3 seconds. 6361. Default route containing no `max_stream_duration` setting. 637 638There are four sub-tests: 639 6401. `app_timeout_exceeded` 641 1. Test client configured to send UnaryCall RPCs with a 1s application 642 timeout, and metadata of `rpc-behavior: sleep-2`. 643 1. Test driver asserts client receives ~100% status `DEADLINE_EXCEEDED`. 6441. `timeout_not_exceeded` 645 1. Test client configured to send UnaryCall RPCs with the default 646 application timeout (20 seconds), and no metadata. 647 1. Test driver asserts client receives ~100% status `OK`. 6481. `timeout_exceeded` (executed with the below test case) 6491. `timeout_different_route` 650 1. Test client configured to send UnaryCall RPCs and EmptyCall RPCs with 651 the default application timeout (20 seconds), and metadata of 652 `rpc-behavior: sleep-4`. 653 1. Test driver asserts client receives ~100% status `OK` for EmptyCall 654 and ~100% status `DEADLINE_EXCEEDED` for UnaryCall. 655 656### api_listener 657The test case verifies a specific use case where it creates a second TD API 658listener using the same name as the existing one and then delete the old one. 659The test driver verifies this is a safe way to update the API listener 660configuration while keep using the existing name. 661 662Client parameters: 663 6641. --num_channels=1 6651. --qps=100 666 667Load balancer configuration: 668 6691. One MIG with two backends. 670 671Assert: 672 673The test driver configuration steps: 6741. The test driver creates the first set of forwarding rule + target proxy + 675URL map with a test host name. 6761. Then the test driver creates a second set of forwarding rule + target proxy + 677URL map with the same test host name. 6781. The test driver deletes the first set of configurations in step 1. 679 680The test driver verifies, at each configuration step, the traffic is always able 681to reach the designated hosts. 682 683### metadata_filter 684This test case verifies that metadata filter configurations in URL map match 685rule are effective at Traffic Director for routing selection against downstream 686node metadata. 687 688Client parameters: 689 6901. --num_channels=1 6911. --qps=100 692 693Load balancer configuration: 694 6951. Two MIGs in the same zone, each having two backends. 696 697There are four test sub-cases: 6981. Test `MATCH_ALL` metadata filter criteria. 6991. Test `MATCH_ANY` metadata filter criteria. 7001. Test mixed `MATCH_ALL` and `MATCH_ANY` metadata filter criteria. 7011. Test when multiple match rules with metadata filter all match. 702 703Assert: 704 705At each test sub-case described above, the test driver configures 706and verifies: 707 7081. Set default URL map, and verify traffic goes to the original backend hosts. 7091. Then patch URL map to update the match rule with metadata filter 710configuration under test added. 7111. Then it verifies traffic switches to alternate backend service hosts. 712 713This way, we test that TD correctly evaluates both matching and non-matching 714configuration scenario. 715 716### forwarding_rule_port_match 717This test verifies that request server uri port should match with the GCP 718forwarding rule configuration port. 719 720Client parameters: 721 7221. --num_channels=1 7231. --qps=100 724 725Load balancer configuration: 726 7271. One MIG with two backends. 728 729Assert: 7301. The test driver configures matching port in the forwarding rule and in the 731request server uri, then verifies traffic reaches backend service instances. 7321. The test driver updates the forwarding rule to use a different port, then 733verifies that the traffic stops going to those backend service instances. 734 735### forwarding_rule_default_port 736This test verifies that omitting port in the request server uri should only 737match with the default port(80) configuration in the forwarding rule. 738In addition, request server uri port should exactly match that in the URL map 739host rule, as described in 740[public doc](https://cloud.google.com/traffic-director/docs/proxyless-overview#proxyless-url-map). 741 742Client parameters: 743 7441. --num_channels=1 7451. --qps=100 746 747Load balancer configuration: 748 7491. One MIG with two backends. 750 751Assert: 752 753Test driver configures and verifies: 7541. No traffic goes to backends when configuring the target URI 755`xds:///myservice`, the forwarding rule with port *x != 80*, the URL map 756host rule `myservice::x`. 7571. Traffic goes to backends when configuring the target URI `xds:///myservice`, 758the forwarding rule port `80` and the URL map host rule `myservice`. 7591. No traffic goes to backends when configuring the target URI 760`xds:///myservice`, the forwarding rule port `80` and the host rule 761`myservice::80`. 762 763### outlier_detection 764This test verifies that the client applies the outlier detection configuration 765and temporarily drops traffic to a server that fails requests. 766 767Client parameters: 768 7691. --num_channels=1 7702. --qps=100 771 772Load balancer configuration: 773 7741. One MIG with five backends, with a `backendService` configuration with the 775 following `outlierDetection` entry 776 ```json 777 { 778 "interval": { 779 "seconds": 2, 780 "nanos": 0 781 }, 782 "successRateRequestVolume": 20 783 } 784 ``` 785Assert: 786 7871. The test driver asserts that traffic is equally distribted among the 788five backends, and all requests end with the `OK` status. 7892. The test driver chooses one of the five backends to fail requests, and 790configures the client to send the metadata 791`rpc-behavior: hostname=<chosen backend> error-code-2`. The driver asserts 792that during some 10-second interval, all traffic goes to the other four 793backends and all requests end with the `OK` status. 7943. The test driver removes the client configuration to send metadata. The 795driver asserts that during some 10-second interval, traffic is equally 796distributed among the five backends, and all requests end with the `OK` status. 797 798### custom_lb 799This test verifies that a custom load balancer policy can be configured in the 800client. It also verifies that when given a list of policies the client can 801ignore a bad one and try the next one on the list until it finds a good one. 802 803Client parameters: 804 8051. --num_channels=1 8062. --qps=100 807 808Load balancer configuration: 809 810One MIG with a single backend. 811 812The `backendService` will have the following `localityLbPolicies` entry: 813```json 814[ 815 { 816 "customPolicy": { 817 "name": "test.ThisLoadBalancerDoesNotExist", 818 "data": "{ \"foo\": \"bar\" }" 819 } 820 }, 821 { 822 "customPolicy": { 823 "name": "test.RpcBehaviorLoadBalancer", 824 "data": "{ \"rpcBehavior\": \"error-code-15\" }" 825 } 826 } 827] 828``` 829 830The client **should not** implement the `test.ThisLoadBalancerDoesNotExist`, but 831it **should** implement `test.RpcBehaviorLoadBalancer`. The 832`RpcBehaviorLoadBalancer` implementation should set the rpcBehavior request 833header based on the configuration it is provided. The `rpcBehavior` field value 834in the config should be used as the header value. 835 836Assert: 837 8381. The first custom policy is ignored as the client does not have an 839implementation for it. 8402. The second policy, that **is** implemented by the client, has been applied 841by the client. This can be asserted by confirming that each request has 842failed with the configured error code 15 (DATA_LOSS). We should get this error 843because the test server knows to look for the `rpcBehavior` header and fail 844a request with a provided error code. 845 846Note that while this test is for load balancing, we can get by with a single 847backend as our test load balancer does not perform any actual load balancing, 848instead only applying the `rpcBehavior` header to each request. 849