xds: enable wrr env variable (#10100)

This commit is contained in:
yifeizhuang 2023-04-25 10:15:24 -07:00 committed by GitHub
parent 87fe41046a
commit c4c9939887
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -55,7 +55,7 @@ abstract class XdsResourceType<T extends ResourceUpdate> {
: Boolean.parseBoolean(System.getProperty("io.grpc.xds.experimentalEnableLeastRequest"));
@VisibleForTesting
static boolean enableWrr = getFlag("GRPC_EXPERIMENTAL_XDS_WRR_LB", false);
static boolean enableWrr = getFlag("GRPC_EXPERIMENTAL_XDS_WRR_LB", true);
static final String TYPE_URL_CLUSTER_CONFIG =
"type.googleapis.com/envoy.extensions.clusters.aggregate.v3.ClusterConfig";
static final String TYPE_URL_TYPED_STRUCT_UDPA =

View File

@ -175,7 +175,7 @@ public class XdsClientImplDataTest {
originalEnableLeastRequest = XdsResourceType.enableLeastRequest;
assertThat(originalEnableLeastRequest).isFalse();
originalEnableWrr = XdsResourceType.enableWrr;
assertThat(originalEnableWrr).isFalse();
assertThat(originalEnableWrr).isTrue();
}
@After
@ -1993,8 +1993,6 @@ public class XdsClientImplDataTest {
@Test
public void parseCluster_WrrLbPolicy_defaultLbConfig() throws ResourceInvalidException {
XdsResourceType.enableWrr = true;
LoadBalancingPolicy wrrConfig =
LoadBalancingPolicy.newBuilder().addPolicies(
LoadBalancingPolicy.Policy.newBuilder()