mirror of https://github.com/grpc/grpc-java.git
xds: enable wrr env variable (#10100)
This commit is contained in:
parent
87fe41046a
commit
c4c9939887
|
@ -55,7 +55,7 @@ abstract class XdsResourceType<T extends ResourceUpdate> {
|
||||||
: Boolean.parseBoolean(System.getProperty("io.grpc.xds.experimentalEnableLeastRequest"));
|
: Boolean.parseBoolean(System.getProperty("io.grpc.xds.experimentalEnableLeastRequest"));
|
||||||
|
|
||||||
@VisibleForTesting
|
@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 =
|
static final String TYPE_URL_CLUSTER_CONFIG =
|
||||||
"type.googleapis.com/envoy.extensions.clusters.aggregate.v3.ClusterConfig";
|
"type.googleapis.com/envoy.extensions.clusters.aggregate.v3.ClusterConfig";
|
||||||
static final String TYPE_URL_TYPED_STRUCT_UDPA =
|
static final String TYPE_URL_TYPED_STRUCT_UDPA =
|
||||||
|
|
|
@ -175,7 +175,7 @@ public class XdsClientImplDataTest {
|
||||||
originalEnableLeastRequest = XdsResourceType.enableLeastRequest;
|
originalEnableLeastRequest = XdsResourceType.enableLeastRequest;
|
||||||
assertThat(originalEnableLeastRequest).isFalse();
|
assertThat(originalEnableLeastRequest).isFalse();
|
||||||
originalEnableWrr = XdsResourceType.enableWrr;
|
originalEnableWrr = XdsResourceType.enableWrr;
|
||||||
assertThat(originalEnableWrr).isFalse();
|
assertThat(originalEnableWrr).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
@ -1993,8 +1993,6 @@ public class XdsClientImplDataTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void parseCluster_WrrLbPolicy_defaultLbConfig() throws ResourceInvalidException {
|
public void parseCluster_WrrLbPolicy_defaultLbConfig() throws ResourceInvalidException {
|
||||||
XdsResourceType.enableWrr = true;
|
|
||||||
|
|
||||||
LoadBalancingPolicy wrrConfig =
|
LoadBalancingPolicy wrrConfig =
|
||||||
LoadBalancingPolicy.newBuilder().addPolicies(
|
LoadBalancingPolicy.newBuilder().addPolicies(
|
||||||
LoadBalancingPolicy.Policy.newBuilder()
|
LoadBalancingPolicy.Policy.newBuilder()
|
||||||
|
|
Loading…
Reference in New Issue