mirror of https://github.com/grpc/grpc-java.git
rls, xds: fix parameter comments that do not match the formal parameter name (#7319)
This commit is contained in:
parent
40b331e886
commit
eb6110cefc
|
|
@ -356,7 +356,7 @@ public class CachingRlsLbClientTest {
|
|||
/* lookupServiceTimeoutInMillis= */ TimeUnit.SECONDS.toMillis(2),
|
||||
/* maxAgeInMillis= */ TimeUnit.SECONDS.toMillis(300),
|
||||
/* staleAgeInMillis= */ TimeUnit.SECONDS.toMillis(240),
|
||||
/* cacheSize= */ 1000,
|
||||
/* cacheSizeBytes= */ 1000,
|
||||
/* validTargets= */ ImmutableList.of("a valid target"),
|
||||
/* defaultTarget= */ "us_east_1.cloudbigtable.googleapis.com");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ public class RlsProtoConvertersTest {
|
|||
/* lookupServiceTimeoutInMillis= */ TimeUnit.SECONDS.toMillis(2),
|
||||
/* maxAgeInMillis= */ TimeUnit.SECONDS.toMillis(300),
|
||||
/* staleAgeInMillis= */ TimeUnit.SECONDS.toMillis(240),
|
||||
/* cacheSize= */ 1000,
|
||||
/* cacheSizeBytes= */ 1000,
|
||||
/* validTargets= */ ImmutableList.of("a valid target"),
|
||||
/* defaultTarget= */ "us_east_1.cloudbigtable.googleapis.com");
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class RlsRequestFactoryTest {
|
|||
/* lookupServiceTimeoutInMillis= */ TimeUnit.SECONDS.toMillis(2),
|
||||
/* maxAgeInMillis= */ TimeUnit.SECONDS.toMillis(300),
|
||||
/* staleAgeInMillis= */ TimeUnit.SECONDS.toMillis(240),
|
||||
/* cacheSize= */ 1000,
|
||||
/* cacheSizeBytes= */ 1000,
|
||||
/* validTargets= */ ImmutableList.of("a valid target"),
|
||||
/* defaultTarget= */ "us_east_1.cloudbigtable.googleapis.com");
|
||||
|
||||
|
|
|
|||
|
|
@ -744,43 +744,42 @@ public class XdsClientImplTest {
|
|||
verify(configWatcher).onConfigChanged(configUpdateCaptor.capture());
|
||||
List<EnvoyProtoData.Route> routes = configUpdateCaptor.getValue().getRoutes();
|
||||
assertThat(routes).hasSize(4);
|
||||
assertThat(routes.get(0)).isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// path match with cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* prefix= */ null,
|
||||
/* path= */ "/service1/method1"),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L), "cl1.googleapis.com", null)));
|
||||
assertThat(routes.get(1)).isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// path match with weighted cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* prefix= */ null,
|
||||
/* path= */ "/service2/method2"),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L),
|
||||
null,
|
||||
ImmutableList.of(
|
||||
new EnvoyProtoData.ClusterWeight("cl21.googleapis.com", 30),
|
||||
new EnvoyProtoData.ClusterWeight("cl22.googleapis.com", 70)
|
||||
))));
|
||||
assertThat(routes.get(2)).isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// prefix match with cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* prefix= */ "/service1/",
|
||||
/* path= */ null),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L), "cl1.googleapis.com", null)));
|
||||
assertThat(routes.get(3)).isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// default match with cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* prefix= */ "",
|
||||
/* path= */ null),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L), "cluster.googleapis.com", null)));
|
||||
assertThat(routes.get(0))
|
||||
.isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// path match with cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* pathPrefixMatch= */ null,/* pathExactMatch= */ "/service1/method1"),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L), "cl1.googleapis.com", null)));
|
||||
assertThat(routes.get(1))
|
||||
.isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// path match with weighted cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* pathPrefixMatch= */ null,/* pathExactMatch= */ "/service2/method2"),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L),
|
||||
null,
|
||||
ImmutableList.of(
|
||||
new EnvoyProtoData.ClusterWeight("cl21.googleapis.com", 30),
|
||||
new EnvoyProtoData.ClusterWeight("cl22.googleapis.com", 70)))));
|
||||
assertThat(routes.get(2))
|
||||
.isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// prefix match with cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* pathPrefixMatch= */ "/service1/",/* pathExactMatch= */ null),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L), "cl1.googleapis.com", null)));
|
||||
assertThat(routes.get(3))
|
||||
.isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// default match with cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* pathPrefixMatch= */ "",/* pathExactMatch= */ null),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L), "cluster.googleapis.com", null)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -745,43 +745,42 @@ public class XdsClientImplTestV2 {
|
|||
verify(configWatcher).onConfigChanged(configUpdateCaptor.capture());
|
||||
List<EnvoyProtoData.Route> routes = configUpdateCaptor.getValue().getRoutes();
|
||||
assertThat(routes).hasSize(4);
|
||||
assertThat(routes.get(0)).isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// path match with cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* prefix= */ null,
|
||||
/* path= */ "/service1/method1"),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L), "cl1.googleapis.com", null)));
|
||||
assertThat(routes.get(1)).isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// path match with weighted cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* prefix= */ null,
|
||||
/* path= */ "/service2/method2"),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L),
|
||||
null,
|
||||
ImmutableList.of(
|
||||
new EnvoyProtoData.ClusterWeight("cl21.googleapis.com", 30),
|
||||
new EnvoyProtoData.ClusterWeight("cl22.googleapis.com", 70)
|
||||
))));
|
||||
assertThat(routes.get(2)).isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// prefix match with cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* prefix= */ "/service1/",
|
||||
/* path= */ null),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L), "cl1.googleapis.com", null)));
|
||||
assertThat(routes.get(3)).isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// default match with cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* prefix= */ "",
|
||||
/* path= */ null),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L), "cluster.googleapis.com", null)));
|
||||
assertThat(routes.get(0))
|
||||
.isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// path match with cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* pathPrefixMatch= */ null,/* pathExactMatch= */ "/service1/method1"),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L), "cl1.googleapis.com", null)));
|
||||
assertThat(routes.get(1))
|
||||
.isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// path match with weighted cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* pathPrefixMatch= */ null,/* pathExactMatch= */ "/service2/method2"),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L),
|
||||
null,
|
||||
ImmutableList.of(
|
||||
new EnvoyProtoData.ClusterWeight("cl21.googleapis.com", 30),
|
||||
new EnvoyProtoData.ClusterWeight("cl22.googleapis.com", 70)))));
|
||||
assertThat(routes.get(2))
|
||||
.isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// prefix match with cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* pathPrefixMatch= */ "/service1/",/* pathExactMatch= */ null),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L), "cl1.googleapis.com", null)));
|
||||
assertThat(routes.get(3))
|
||||
.isEqualTo(
|
||||
new EnvoyProtoData.Route(
|
||||
// default match with cluster route
|
||||
new io.grpc.xds.RouteMatch(
|
||||
/* pathPrefixMatch= */ "",/* pathExactMatch= */ null),
|
||||
new EnvoyProtoData.RouteAction(
|
||||
TimeUnit.SECONDS.toNanos(15L), "cluster.googleapis.com", null)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue