Skip to content

Commit 4f8db69

Browse files
committed
grpc-js-xds: Fix a typo in xds_cluster_impl parsing code
1 parent 1137102 commit 4f8db69

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

packages/grpc-js-xds/src/load-balancer-xds-cluster-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class XdsClusterImplLoadBalancingConfig implements TypedLoadBalancingConfig {
115115
if ('eds_service_name' in obj && !(obj.eds_service_name === undefined || typeof obj.eds_service_name === 'string')) {
116116
throw new Error('xds_cluster_impl config eds_service_name field must be a string if provided');
117117
}
118-
if ('max_concurrent_requests' in obj && (!obj.max_concurrent_requests === undefined || typeof obj.max_concurrent_requests === 'number')) {
118+
if ('max_concurrent_requests' in obj && !(obj.max_concurrent_requests === undefined || typeof obj.max_concurrent_requests === 'number')) {
119119
throw new Error('xds_cluster_impl config max_concurrent_requests must be a number if provided');
120120
}
121121
if (!('drop_categories' in obj && Array.isArray(obj.drop_categories))) {

packages/grpc-js-xds/test/framework.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,15 @@ export class FakeEdsCluster implements FakeCluster {
8484
type: 'EDS',
8585
eds_cluster_config: {eds_config: {ads: {}}, service_name: this.endpointName},
8686
lb_policy: 'ROUND_ROBIN',
87-
lrs_server: {self: {}}
87+
lrs_server: {self: {}},
88+
circuit_breakers: {
89+
thresholds: [
90+
{
91+
priority: 'DEFAULT',
92+
max_requests: {value: 1000}
93+
}
94+
]
95+
}
8896
}
8997
}
9098

0 commit comments

Comments
 (0)