xds: fix lint warnings in test code (#6559)

This commit is contained in:
Kun Zhang 2019-12-27 11:14:51 -08:00 committed by Jihun Cho
parent 90969b3471
commit d227520388
1 changed files with 18 additions and 14 deletions

View File

@ -374,12 +374,12 @@ public class XdsNameResolverTest {
}
/**
* Builds an LDS DiscoveryResponse containing the mapping of given host name (with port if any)
* to the given cluster name directly in-line. Clients receiving this response is able to
* resolve cluster name for the given hostname:port immediately.
* Builds an LDS DiscoveryResponse containing the mapping of given host name (with port if any) to
* the given cluster name directly in-line. Clients receiving this response is able to resolve
* cluster name for the given hostname:port immediately.
*/
private DiscoveryResponse buildLdsResponseForCluster(String versionInfo,
String hostName, int port, String clusterName, String nonce) {
private static DiscoveryResponse buildLdsResponseForCluster(
String versionInfo, String hostName, int port, String clusterName, String nonce) {
String ldsResourceName = port == -1 ? hostName : hostName + ":" + port;
List<Any> listeners = ImmutableList.of(
Any.pack(buildListener(ldsResourceName,
@ -396,12 +396,12 @@ public class XdsNameResolverTest {
}
/**
* Builds an LDS DiscoveryResponse containing the mapping of given host name (with port if any)
* to the given RDS resource name. Clients receiving this response is able to send an RDS
* request for resolving the cluster name for the given hostname:port.
* Builds an LDS DiscoveryResponse containing the mapping of given host name (with port if any) to
* the given RDS resource name. Clients receiving this response is able to send an RDS request for
* resolving the cluster name for the given hostname:port.
*/
private DiscoveryResponse buildLdsResponseForRdsResource(String versionInfo,
String hostName, int port, String routeConfigName, String nonce) {
private static DiscoveryResponse buildLdsResponseForRdsResource(
String versionInfo, String hostName, int port, String routeConfigName, String nonce) {
String ldsResourceName = port == -1 ? hostName : hostName + ":" + port;
Rds rdsConfig =
Rds.newBuilder()
@ -418,11 +418,15 @@ public class XdsNameResolverTest {
}
/**
* Builds an RDS DiscoveryResponse containing the mapping of given route config name to the
* given cluster name under.
* Builds an RDS DiscoveryResponse containing the mapping of given route config name to the given
* cluster name under.
*/
private DiscoveryResponse buildRdsResponseForCluster(String versionInfo,
String routeConfigName, String hostName, String clusterName, String nonce) {
private static DiscoveryResponse buildRdsResponseForCluster(
String versionInfo,
String routeConfigName,
String hostName,
String clusterName,
String nonce) {
List<Any> routeConfigs = ImmutableList.of(
Any.pack(
buildRouteConfiguration(